From 04153abb4b8d1b972652034c3bf7d78588144c83 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Aug 2011 08:59:46 -0700 Subject: [PATCH] testlibrbd: remove useless sizeofs Should be sizeof(*result), if anything. Signed-off-by: Sage Weil --- src/testlibrbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testlibrbd.c b/src/testlibrbd.c index 348d5213d0956..eddffd8946be7 100644 --- a/src/testlibrbd.c +++ b/src/testlibrbd.c @@ -193,7 +193,7 @@ void write_test_data(rbd_image_t image, const char *test_data, uint64_t off, siz void aio_read_test_data(rbd_image_t image, const char *expected, uint64_t off, size_t len) { rbd_completion_t comp; - char *result = malloc(sizeof(result) * (len + 1)); + char *result = malloc(len + 1); assert(result); rbd_aio_create_completion(NULL, (rbd_callback_t) simple_read_cb, &comp); @@ -213,7 +213,7 @@ void aio_read_test_data(rbd_image_t image, const char *expected, uint64_t off, s void read_test_data(rbd_image_t image, const char *expected, uint64_t off, size_t len) { ssize_t read; - char *result = malloc(sizeof(result) * (len + 1)); + char *result = malloc(len + 1); assert(result); read = rbd_read(image, off, len, result); -- 2.39.5