From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id E7C317E6A for ; Wed, 17 Dec 2014 13:55:32 +0100 (CET) Received: by mail-wg0-f53.google.com with SMTP id l18so20109563wgh.40 for ; Wed, 17 Dec 2014 04:55:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1fW1SLuPApHJbwqO6KSXTJMmUglwU0KyAZskpap88D8=; b=iCqbA6v+hFK3ZXTUm3pTKNrNYwVVffmzfRqcztGyJDvKHzBYvDUrR5gDDtNPhCS5R4 mlO3kMKLd0ozaTuT3U29KRH9zp/Fr5LAKINue5uG8y3JYmJVGm7gI7VW0Z3Qvyme7Dsh qakbz8b+9fW5eKWWbS2LOSeryq9xtU/bALqYigYeEOT6luVkSLsJOG8VkRjvnkjCf6Rn UNBO5dhPefgg8340dFRtVBiWF55NiKkMXb99YwUJXpTQv3EqXvuah+8FDN74b4ZBwZ+l o18czpQW+GWY/VOOKrxt+XbJZe3Ys71medVaBk/ZnRSqfpmuJatNs6rrWFQyaxUZpeK5 /90g== X-Gm-Message-State: ALoCoQnmWJHfrpa4LjtgoEvN6c879cUlxaBqWwuaiLdBv+LgVeVRRzo9R87WdjsX4+mtW1wH3iAW X-Received: by 10.180.94.37 with SMTP id cz5mr14008189wib.61.1418820932790; Wed, 17 Dec 2014 04:55:32 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id gs10sm6948929wib.12.2014.12.17.04.55.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Dec 2014 04:55:32 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Wed, 17 Dec 2014 13:55:21 +0100 Message-Id: <1418820925-20318-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418820925-20318-1-git-send-email-olivier.matz@6wind.com> References: <1418820925-20318-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 1/5] test-devargs: fix misplaced braces in strncmp call X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 12:55:33 -0000 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 occurence was forgotten. Signed-off-by: Olivier Matz --- app/test/test_devargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c index dcbdd09..3d9f7bc 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(); -- 2.1.3