linux-4.18-rc8/tools/hv/hv_kvp_daemon.c:289: dead code block ?

KY Srinivasan kys at microsoft.com
Mon Aug 6 15:28:03 UTC 2018



> -----Original Message-----
> From: David Binderman <dcb314 at hotmail.com>
> Sent: Monday, August 6, 2018 1:08 AM
> To: KY Srinivasan <kys at microsoft.com>; Haiyang Zhang
> <haiyangz at microsoft.com>; Stephen Hemminger
> <sthemmin at microsoft.com>; devel at linuxdriverproject.org; linux-
> kernel at vger.kernel.org
> Subject: linux-4.18-rc8/tools/hv/hv_kvp_daemon.c:289: dead code block ?
> 
> 
> Hello there,
> 
> linux-4.18-rc8/tools/hv/hv_kvp_daemon.c:282] -> [linux-4.18-
> rc8/tools/hv/hv_kvp_daemon.c:289]: (warning) Opposite inner 'if' condition
> leads to a dead code block.
> 
> Source code is
> 
>        for (i = 0; i < num_records; i++) {
>                 if (memcmp(key, record[i].key, key_size))
>                         continue;
>                 /*
>                  * Found a match; just move the remaining
>                  * entries up.
>                  */
>                 if (i == num_records) {

Thank you! We will fix the issue.

K. Y
> 
> Regards
> 
> David Binderman


More information about the devel mailing list