test_librbd.cc: fix sizeof() in malloc call

Use 'char' instead of 'char *'.

228  names = (char *) malloc(sizeof(char *) * 1024);
     Result of 'malloc' is converted to a pointer of type 'char',
     which is incompatible with sizeof operand type 'char *'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2014-05-10 10:58:56 +02:00
parent eb2def87f8
commit fe75075574

View File

@ -225,7 +225,7 @@ int test_ls(rados_ioctx_t io_ctx, size_t num_expected, ...)
va_list ap;
size_t max_size = 1024;
names = (char *) malloc(sizeof(char *) * 1024);
names = (char *) malloc(sizeof(char) * 1024);
int len = rbd_list(io_ctx, names, &max_size);
for (i = 0, num_images = 0, cur_name = names; cur_name < names + len; i++) {