[PATCH 2/9 linux-next] fanotify: fanotify_encode_fid(): variable init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Initialize variables at declaration.

Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
 fs/notify/fanotify/fanotify.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 95480d3dcff7..5c6f29d2d8f9 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -277,16 +277,15 @@ static u32 fanotify_group_event_mask(struct fsnotify_group *group,
 static void fanotify_encode_fh(struct fanotify_fh *fh, struct inode *inode,
 			       gfp_t gfp)
 {
-	int dwords, type, bytes = 0;
+	int dwords = 0, bytes = 0;
+	int err = -ENOENT;
+	int type;
 	char *ext_buf = NULL;
 	void *buf = fh->buf;
-	int err;
 
 	if (!inode)
 		goto out;
 
-	dwords = 0;
-	err = -ENOENT;
 	type = exportfs_encode_inode_fh(inode, NULL, &dwords, NULL);
 	if (!dwords)
 		goto out_err;
-- 
2.26.2




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux