lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 26 Nov 2019 08:38:24 -0800
From:   Joe Perches <joe@...ches.com>
To:     Jules Irenge <jbi.octave@...il.com>,
        trond.myklebust@...merspace.com
Cc:     anna.schumaker@...app.com, davem@...emloft.net,
        linux-nfs@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: sunrpc:  replace 0 with NULL

On Mon, 2019-11-25 at 22:52 +0000, Jules Irenge wrote:
> Replace 0 with NULL to fix warning detected by sparse tool.
> warning: Using plain integer as NULL pointer
[]
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
[]
> @@ -614,7 +614,7 @@ xs_read_stream_reply(struct sock_xprt *transport, struct msghdr *msg, int flags)
>  static ssize_t
>  xs_read_stream(struct sock_xprt *transport, int flags)
>  {
> -	struct msghdr msg = { 0 };
> +	struct msghdr msg = { NULL };

Rather than depending on the first member to be a pointer
perhaps better to use the equivalent

	struct msghdr msg = {};


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ