summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-26 13:57:08 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-26 13:57:08 +0200
commitc9460c81c186c3f0cb10e16d72dcd8aaa8001d21 (patch)
tree5621967ad3b8f9b2b5abb188468b8401d7f20c41
parent86fdb2ce31177028de997b98cc71b5027cf0bc1c (diff)
downloadnettle-c9460c81c186c3f0cb10e16d72dcd8aaa8001d21.tar.gz
Use size_t for realloc functions.
-rw-r--r--nettle-types.h2
-rw-r--r--realloc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/nettle-types.h b/nettle-types.h
index cd6ad15d..18aeeeef 100644
--- a/nettle-types.h
+++ b/nettle-types.h
@@ -40,7 +40,7 @@ typedef void nettle_random_func(void *ctx,
typedef void nettle_progress_func(void *ctx, int c);
/* Realloc function, used by struct nettle_buffer. */
-typedef void *nettle_realloc_func(void *ctx, void *p, unsigned length);
+typedef void *nettle_realloc_func(void *ctx, void *p, size_t length);
/* Ciphers */
typedef void nettle_set_key_func(void *ctx,
diff --git a/realloc.c b/realloc.c
index 5c12a0b9..705ff185 100644
--- a/realloc.c
+++ b/realloc.c
@@ -35,7 +35,7 @@
totally free the object, it is allowed to return a valid
pointer. */
void *
-nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
+nettle_realloc(void *ctx UNUSED, void *p, size_t length)
{
if (length > 0)
return realloc(p, length);
@@ -45,7 +45,7 @@ nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
}
void *
-nettle_xrealloc(void *ctx UNUSED, void *p, unsigned length)
+nettle_xrealloc(void *ctx UNUSED, void *p, size_t length)
{
if (length > 0)
{