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

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