[PATCH] autofs-5.1.2: Avoid local variable name shadowing another

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

 



There are two local variabls int ret, and the one in the
inner scope doesn't need to be named as int ret.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx>
---
 daemon/automount.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/daemon/automount.c b/daemon/automount.c
index ca5e090..63e139d 100644
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -310,17 +310,13 @@ static int walk_tree(const char *base, int (*fn) (struct autofs_point *ap,
 				return -1;
 
 			while (n--) {
-				int ret, size;
-
 				if (strcmp(de[n]->d_name, ".") == 0 ||
 				    strcmp(de[n]->d_name, "..") == 0) {
 					free(de[n]);
 					continue;
 				}
 
-				size = sizeof(buf);
-				ret = cat_path(buf, size, base, de[n]->d_name);
-				if (!ret) {
+				if (!cat_path(buf, sizeof(buf), base, de[n]->d_name)) {
 					do {
 						free(de[n]);
 					} while (n--);
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux