From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] test: fix misplaced braces in strncmp call Date: Mon, 24 Nov 2014 16:54:34 +0100 Message-ID: <16317398.W5JJMvBuqs@xps13> References: <1416387973-28431-1-git-send-email-bruce.richardson@intel.com> <546C6EF3.1080507@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org, Larry Wang To: Bruce Richardson Return-path: In-Reply-To: <546C6EF3.1080507-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > > This patch fixes two occurances where a 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, as the author presumably originally intended. > > > > Reported-by: Larry Wang > > Signed-off-by: Bruce Richardson > > Nice catch! > > Acked-by: Olivier Matz Applied Thanks -- Thomas