diff mbox

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

Message ID 1376421629-21382-5-git-send-email-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Mayhew Aug. 13, 2013, 7:20 p.m. UTC
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@redhat.com>
---
 utils/mount/configfile.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
diff mbox

Patch

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 {