autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
To: raven@themaw.net, autofs@vger.kernel.org
Cc: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Subject: [PATCH] autofs-5.1.2: Avoid local variable name shadowing another
Date: Sun, 28 Aug 2016 13:06:52 +0900	[thread overview]
Message-ID: <1472357212-1920-1-git-send-email-kusumi.tomohiro@gmail.com> (raw)

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@gmail.com>
---
 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

                 reply	other threads:[~2016-08-28  4:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472357212-1920-1-git-send-email-kusumi.tomohiro@gmail.com \
    --to=kusumi.tomohiro@gmail.com \
    --cc=autofs@vger.kernel.org \
    --cc=raven@themaw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).