autofs-5.1.2: Avoid local variable name shadowing another
PATCH 1/1 autofs-5.1.2: Avoid local variable name shadowing another
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 <[email protected]>
--- daemon/automount.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
daemon/automount.c +1 -5
@@ -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--);
Signature · 4 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe autofs" in