]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Use size_t for realloc functions.
authorNiels Möller <nisse@lysator.liu.se>
Fri, 26 Apr 2013 11:57:08 +0000 (13:57 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 26 Apr 2013 11:57:08 +0000 (13:57 +0200)
nettle-types.h
realloc.c

index cd6ad15dbb199a4990d3fbd8b39009dd0f3dadfb..18aeeeef262a2f79761902578a047638dada0319 100644 (file)
@@ -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,
index 5c12a0b9c61839d6f2947d51e1e2749aa75c43d6..705ff18520f4315c6fe95cd217a0db48a28dee00 100644 (file)
--- 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)
     {