]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testlibrbd: remove useless sizeofs
authorSage Weil <sage@newdream.net>
Mon, 29 Aug 2011 15:59:46 +0000 (08:59 -0700)
committerSage Weil <sage@newdream.net>
Mon, 29 Aug 2011 15:59:46 +0000 (08:59 -0700)
Should be sizeof(*result), if anything.

Signed-off-by: Sage Weil <sage@newdream.net>
src/testlibrbd.c

index 348d5213d09569dac090121b1b2b80e5bf8d5f39..eddffd8946be7f443c0f32707b37b12caa8de4cb 100644 (file)
@@ -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);