Simplify last patch slightly.
authorJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 17 Nov 2008 15:51:17 +0000 (10:51 -0500)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 6 Apr 2009 08:28:51 +0000 (04:28 -0400)
* src/getargs.c (getargs): Here.
(cherry picked from commit 9ce405ce1dd2ff7d495dafe6201b87669549f98b)

ChangeLog
src/getargs.c

index dcfd0a5..14e2674 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
 
+       Simplify last patch slightly.
+       * src/getargs.c (getargs): Here.
+
+2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
+
        Fix last warning from --enable-gcc-warnings.
        * src/getargs.c (getargs): Don't assign const address to non-const
        pointer.
index fddc023..5601e98 100644 (file)
@@ -527,14 +527,10 @@ getargs (int argc, char *argv[])
         {
           char* name = optarg;
           char* value = strchr (optarg, '=');
-          char const * muscle_value = "";
           if (value)
-            {
-              *value++ = 0;
-              muscle_value = value;
-            }
+            *value++ = 0;
           muscle_percent_define_insert (name, command_line_location (),
-                                        muscle_value);
+                                        value ? value : "");
         }
        break;