diff mbox

[2/6] xfs: use NULL instead of 0 to initialize a pointer in xfs_ioc_getfsmap

Message ID 20170421152123.11316-3-hch@lst.de (mailing list archive)
State Accepted
Headers show

Commit Message

Christoph Hellwig April 21, 2017, 3:21 p.m. UTC
Found by sparse.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong April 21, 2017, 7:04 p.m. UTC | #1
On Fri, Apr 21, 2017 at 05:21:19PM +0200, Christoph Hellwig wrote:
> Found by sparse.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/xfs_ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index fee6b4a3a83d..0f8bed9a7e4c 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1640,7 +1640,7 @@ xfs_ioc_getfsmap(
>  	struct xfs_inode	*ip,
>  	void			__user *arg)
>  {
> -	struct getfsmap_info	info = {0};
> +	struct getfsmap_info	info = { NULL };
>  	struct xfs_fsmap_head	xhead = {0};
>  	struct fsmap_head	head;
>  	bool			aborted = false;
> -- 
> 2.11.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index fee6b4a3a83d..0f8bed9a7e4c 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1640,7 +1640,7 @@  xfs_ioc_getfsmap(
 	struct xfs_inode	*ip,
 	void			__user *arg)
 {
-	struct getfsmap_info	info = {0};
+	struct getfsmap_info	info = { NULL };
 	struct xfs_fsmap_head	xhead = {0};
 	struct fsmap_head	head;
 	bool			aborted = false;