diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-03-12 11:24:51 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-12 11:53:03 +0000 |
commit | b8cdf6c2b9d12df6acbe295fd75c8c59c8b7eec1 (patch) | |
tree | 21b33fc8c9f5b8e9b8f484a876d7341e5f512acd | |
parent | 24413ac4d8c8d64b3339f9e61886db8f7fbfed4f (diff) | |
download | libguestfs-b8cdf6c2b9d12df6acbe295fd75c8c59c8b7eec1.tar.gz libguestfs-b8cdf6c2b9d12df6acbe295fd75c8c59c8b7eec1.tar.xz libguestfs-b8cdf6c2b9d12df6acbe295fd75c8c59c8b7eec1.zip |
lib: Use size_t for allocation size in safe realloc function.
-rw-r--r-- | src/guestfs-internal.h | 2 | ||||
-rw-r--r-- | src/guestfs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 82cb9a56..c679ada4 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -366,7 +366,7 @@ extern void guestfs_error_errno (guestfs_h *g, int errnum, const char *fs, ...) __attribute__((format (printf,3,4))); extern void guestfs_perrorf (guestfs_h *g, const char *fs, ...) __attribute__((format (printf,2,3))); -extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes); +extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, size_t nbytes); extern char *guestfs_safe_strdup (guestfs_h *g, const char *str); extern char *guestfs_safe_strndup (guestfs_h *g, const char *str, size_t n); extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size); diff --git a/src/guestfs.c b/src/guestfs.c index 187e22ec..40925c8f 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -476,7 +476,7 @@ guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s) } void * -guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes) +guestfs_safe_realloc (guestfs_h *g, void *ptr, size_t nbytes) { void *p = realloc (ptr, nbytes); if (nbytes > 0 && !p) g->abort_cb (); |