← Commit list

a803bfa0f

Denys Vlasenko
Denys Vlasenko
2012-11-05
SUCCESS Duration: 187s

Subject

ifupdown: remove unused errno assignments

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ifupdown.c+3 -6
@@ -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;
}