From: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx> 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> Signed-off-by: Ian Kent <raven@xxxxxxxxxx> --- CHANGELOG | 1 + daemon/automount.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ec1812a..853d40c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ xx/xx/2016 autofs-5.1.3 - fix short memory allocation in lookup_amd_instance(). - fix count_mounts() function. - configure: add cache variable for Linux proc filesystem check. +- Avoid local variable name shadowing another. 15/06/2016 autofs-5.1.2 ======================= diff --git a/daemon/automount.c b/daemon/automount.c index 8d98054..9d4c2b7 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--); -- To unsubscribe from this list: send the line "unsubscribe autofs" in