Blame SOURCES/autofs-5.1.0-beta1-cleanup-options-in-amd_parse-c.patch

306fa1
autofs-5.1.0-beta1 - cleanup options in amd_parse.c
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Remove useless duplicated memset() calls from mount options handling
306fa1
in the amd parser.
306fa1
---
306fa1
 CHANGELOG           |    1 +
306fa1
 modules/amd_parse.y |   13 +++++--------
306fa1
 2 files changed, 6 insertions(+), 8 deletions(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -123,6 +123,7 @@
306fa1
 - fix hash on confg option add and delete.
306fa1
 - add plus to path match pattern.
306fa1
 - fix multi entry ldap option handling.
306fa1
+- cleanup options in amd_parse.c
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/modules/amd_parse.y
306fa1
+++ autofs-5.0.7/modules/amd_parse.y
306fa1
@@ -360,17 +360,14 @@ option_assignment: MAP_OPTION OPTION_ASS
306fa1
 	}
306fa1
 	| MNT_OPTION OPTION_ASSIGN options
306fa1
 	{
306fa1
-		if (!strcmp($1, "opts")) {
306fa1
+		memset(opts, 0, sizeof(opts));
306fa1
+		if (!strcmp($1, "opts"))
306fa1
 			entry.opts = amd_strdup(opts);
306fa1
-			memset(opts, 0, sizeof(opts));
306fa1
-		} else if (!strcmp($1, "addopts")) {
306fa1
+		else if (!strcmp($1, "addopts"))
306fa1
 			entry.addopts = amd_strdup(opts);
306fa1
-			memset(opts, 0, sizeof(opts));
306fa1
-		} else if (!strcmp($1, "remopts")) {
306fa1
+		else if (!strcmp($1, "remopts"))
306fa1
 			entry.remopts = amd_strdup(opts);
306fa1
-			memset(opts, 0, sizeof(opts));
306fa1
-		} else {
306fa1
-			memset(opts, 0, sizeof(opts));
306fa1
+		else {
306fa1
 			amd_notify($1);
306fa1
 			YYABORT;
306fa1
 		}