[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <515BF6DA.9010007@huawei.com>
Date: Wed, 3 Apr 2013 17:31:06 +0800
From: dingtianhong <dingtianhong@...wei.com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, <netdev@...r.kernel.org>,
Li Zefan <lizefan@...wei.com>
Subject: [PATCH] af_unix: fix build warning
net/unix/af_unix.c: In function ‘unix_bind’:
net/unix/af_unix.c:892: warning: ‘path.mnt’ may be used uninitialized in this function
net/unix/af_unix.c:892: warning: ‘path.dentry’ may be used uninitialized in this function
Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
---
net/unix/af_unix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 971282b..3ccc049 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -889,7 +889,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
atomic_set(&addr->refcnt, 1);
if (sun_path[0]) {
- struct path path;
+ struct path path = {};
umode_t mode = S_IFSOCK |
(SOCK_INODE(sock)->i_mode & ~current_umask());
err = unix_mknod(sun_path, mode, &path);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists