From: Olivier Matz Date: Wed, 17 Dec 2014 12:55:21 +0000 (+0100) Subject: app/test: fix misplaced braces in strncmp X-Git-Tag: spdx-start~9904 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e89ae122ce0272c677e6937cd8cf105c88da24cd;p=dpdk.git app/test: fix misplaced braces in strncmp One occurrence call to strncmp had the closing brace in the wrong place. Changing this form: if (strncmp(X, Y, sizeof(X) != 0)) which does a comparison of length 1, to if (strncmp(X, Y, sizeof(X)) != 0) which does the correct length comparison and then compares the result to zero in the "if" part. Seen with clang-3.5: "error: size argument in 'strncmp' call is a comparison" This patch is similar to 261386248 but it looks that one occurrence was forgotten. Signed-off-by: Olivier Matz --- diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c index dcbdd09f92..3d9f7bcf2c 100644 --- a/app/test/test_devargs.c +++ b/app/test/test_devargs.c @@ -105,7 +105,7 @@ test_devargs(void) devargs->pci.addr.devid != 0 || devargs->pci.addr.function != 1) goto fail; - if (strncmp(devargs->args, "", sizeof(devargs->args) != 0)) + if (strncmp(devargs->args, "", sizeof(devargs->args)) != 0) goto fail; free_devargs_list();