From 65560eff2832c172938c4ecc6f3bf6a44d53ee60 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 9 Feb 2011 16:19:16 -0800 Subject: [PATCH] testlibrbd: change strcmp to memcmp, other stuff --- src/testlibrbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testlibrbd.c b/src/testlibrbd.c index fb948f350cef5..43acd9af3f9b1 100644 --- a/src/testlibrbd.c +++ b/src/testlibrbd.c @@ -227,7 +227,7 @@ void read_test_data(rbd_image_t image, const char *expected, off_t off) printf("read: %u\n", (unsigned int) read); } printf("read: %s\nexpected: %s\n", result, expected); - assert(strncmp(result, expected, expected_len) == 0); + assert(memcmp(result, expected, expected_len) == 0); } void test_io(rbd_pool_t pool, rbd_image_t image) @@ -259,7 +259,7 @@ int main(int argc, const char **argv) { rbd_pool_t pool; rbd_image_t image; - assert(rbd_initialize(0, NULL) == 0); + assert(rbd_initialize(argc, argv) == 0); assert(rbd_open_pool(TEST_POOL, &pool) == 0); test_ls(pool, 0); test_create_and_stat(pool, TEST_IMAGE, MB_BYTES(1)); -- 2.39.5