lkml.org 
[lkml]   [2018]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] decnet: Remove unnecessary check for dev->name
On Fri, 21 Sep 2018 12:30:34 -0700
Nathan Chancellor <natechancellor@gmail.com> wrote:

> Clang warns that the address of a pointer will always evaluated as true
> in a boolean context.
>
> net/decnet/dn_dev.c:1366:10: warning: address of array 'dev->name' will
> always evaluate to 'true' [-Wpointer-bool-conversion]
> dev->name ? dev->name : "???",
> ~~~~~^~~~ ~
> 1 warning generated.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/116
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Makes sense name in net_device is an array.

Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

\
 
 \ /
  Last update: 2018-09-21 22:20    [W:0.778 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site