[nfs-utils PATCH 4/4] mount.nfs: clean up conf_parse_mntopts()

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

 



It's no longer necessary for conf_parse_mntopts to explicitly check for
argtype != MNT_NOARG after calling should_add_noarg_opt().

Signed-off-by: Scott Mayhew <smayhew@xxxxxxxxxx>
---
 utils/mount/configfile.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
index 623c886..8f68a6e 100644
--- a/utils/mount/configfile.c
+++ b/utils/mount/configfile.c
@@ -364,15 +364,12 @@ conf_parse_mntopts(char *section, char *arg, char *opts)
 			}
 			continue;
 		}
-		if (argtype != MNT_NOARG) {
-			snprintf(buf, BUFSIZ, "no%s", field);
-			if (lookup_entry(buf) != NULL)
-				continue;
-			buf[0] = '\0';
-		}
+		snprintf(buf, BUFSIZ, "no%s", field);
+		if (lookup_entry(buf) != NULL)
+			continue;
+		buf[0] = '\0';
 		if (strcasecmp(value, "false") == 0) {
-			if (argtype != MNT_NOARG)
-				snprintf(buf, BUFSIZ, "no%s", field);
+			snprintf(buf, BUFSIZ, "no%s", field);
 		} else if (strcasecmp(value, "true") == 0) {
 			snprintf(buf, BUFSIZ, "%s", field);
 		} else {
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux