ifupdown: remove unused errno assignments
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 5 Nov 2012 13:18:36 +0000 (14:18 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 5 Nov 2012 13:18:36 +0000 (14:18 +0100)
function                                             old     new   delta
execute                                              607     571     -36

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ifupdown.c

index 9fc1266dae501584f1d26226f1b291a7bbfe8820..650cc706f0fb3a64506e67a23b23306c30f0ae08 100644 (file)
@@ -49,9 +49,6 @@
 #include <fnmatch.h>
 
 #define MAX_OPT_DEPTH 10
-#define EUNBALBRACK 10001
-#define EUNDEFVAR   10002
-#define EUNBALPER   10000
 
 #if ENABLE_FEATURE_IFUPDOWN_MAPPING
 #define MAX_INTERFACE_LENGTH 10
@@ -283,7 +280,7 @@ static char *parse(const char *command, struct interface_defn_t *ifd)
                                command++;
                                nextpercent = strchr(command, '%');
                                if (!nextpercent) {
-                                       errno = EUNBALPER;
+                                       /* Unterminated %var% */
                                        free(result);
                                        return NULL;
                                }
@@ -328,13 +325,13 @@ static char *parse(const char *command, struct interface_defn_t *ifd)
        }
 
        if (opt_depth > 1) {
-               errno = EUNBALBRACK;
+               /* Unbalanced bracket */
                free(result);
                return NULL;
        }
 
        if (!okay[0]) {
-               errno = EUNDEFVAR;
+               /* Undefined variable and we aren't in a bracket */
                free(result);
                return NULL;
        }