diff --git a/zdump/zg.c b/zdump/zg.c index dab3469a..026b1057 100644 --- a/zdump/zg.c +++ b/zdump/zg.c @@ -88,7 +88,7 @@ void __noreturn zg_exit(int rc) /* * Alloc memory and check for errors */ -void *zg_alloc(unsigned int size) +void *zg_alloc(size_t size) { void *ptr = calloc(size, 1); if (!ptr) @@ -99,7 +99,7 @@ void *zg_alloc(unsigned int size) /* * Realloc memory and check for errors */ -void *zg_realloc(void *ptr, unsigned int size) +void *zg_realloc(void *ptr, size_t size) { void *new_ptr = realloc(ptr, size); if (!new_ptr) @@ -308,7 +308,8 @@ off_t zg_seek_cur(const struct zg_fh *zg_fh, off_t off, enum zg_check check) /* * Do ioctl and exit in case of an error */ -int zg_ioctl(const struct zg_fh *zg_fh, int rq, void *data, const char *op, enum zg_check check) +int zg_ioctl(const struct zg_fh *zg_fh, unsigned long rq, void *data, const char *op, + enum zg_check check) { int rc; diff --git a/zdump/zg.h b/zdump/zg.h index d4f3d62b..befa6743 100644 --- a/zdump/zg.h +++ b/zdump/zg.h @@ -48,8 +48,8 @@ STATIC_ASSERT(sizeof(off_t) == sizeof(long)) /* * Memory functions */ -void *zg_alloc(unsigned int size); -void *zg_realloc(void *ptr, unsigned int size); +void *zg_alloc(size_t size); +void *zg_realloc(void *ptr, size_t size); void zg_free(void *ptr); char *zg_strdup(const char *str); @@ -151,7 +151,8 @@ off_t zg_tell(const struct zg_fh *zg_fh, enum zg_check check); off_t zg_seek(const struct zg_fh *zg_fh, off_t off, enum zg_check check); off_t zg_seek_end(const struct zg_fh *zg_fh, off_t off, enum zg_check check); off_t zg_seek_cur(const struct zg_fh *zg_fh, off_t off, enum zg_check check); -int zg_ioctl(const struct zg_fh *zg_fh, int rq, void *data, const char *op, enum zg_check check); +int zg_ioctl(const struct zg_fh *zg_fh, unsigned long rq, void *data, const char *op, + enum zg_check check); enum zg_type zg_type(const struct zg_fh *zg_fh); /*