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

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