summaryrefslogtreecommitdiff
path: root/lib/mem.h
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-06-21 16:03:54 +0200
committerDaiki Ueno <ueno@gnu.org>2020-06-29 15:40:08 +0200
commit9acc0f68320db4c7c6dadacb974e77c7fbca72a7 (patch)
tree41d7fcab2453c10e29a10592216368825a793e9f /lib/mem.h
parentfb71ca5fc9408d49db02eec02d20ad4e040b6790 (diff)
downloadgnutls-tmp-safe-memcmp.tar.gz
safe_memcmp: remove in favor of gnutls_memcmptmp-safe-memcmp
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'lib/mem.h')
-rw-r--r--lib/mem.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/mem.h b/lib/mem.h
index dc838a2b4d..d3eea97a40 100644
--- a/lib/mem.h
+++ b/lib/mem.h
@@ -35,15 +35,6 @@ char *_gnutls_strdup(const char *);
unsigned _gnutls_mem_is_zero(const uint8_t *ptr, unsigned size);
-/* To avoid undefined behavior when s1 or s2 are null and n = 0 */
-inline static
-int safe_memcmp(const void *s1, const void *s2, size_t n)
-{
- if (n == 0)
- return 0;
- return memcmp(s1, s2, n);
-}
-
#define zrelease_mpi_key(mpi) if (*mpi!=NULL) { \
_gnutls_mpi_clear(*mpi); \
_gnutls_mpi_release(mpi); \