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

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