ifupdown: remove unused errno assignments
function old new delta execute 607 571 -36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
11181335f9
commit
a803bfa0f0
@ -49,9 +49,6 @@
|
|||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
#define MAX_OPT_DEPTH 10
|
#define MAX_OPT_DEPTH 10
|
||||||
#define EUNBALBRACK 10001
|
|
||||||
#define EUNDEFVAR 10002
|
|
||||||
#define EUNBALPER 10000
|
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_MAPPING
|
#if ENABLE_FEATURE_IFUPDOWN_MAPPING
|
||||||
#define MAX_INTERFACE_LENGTH 10
|
#define MAX_INTERFACE_LENGTH 10
|
||||||
@ -283,7 +280,7 @@ static char *parse(const char *command, struct interface_defn_t *ifd)
|
|||||||
command++;
|
command++;
|
||||||
nextpercent = strchr(command, '%');
|
nextpercent = strchr(command, '%');
|
||||||
if (!nextpercent) {
|
if (!nextpercent) {
|
||||||
errno = EUNBALPER;
|
/* Unterminated %var% */
|
||||||
free(result);
|
free(result);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -328,13 +325,13 @@ static char *parse(const char *command, struct interface_defn_t *ifd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (opt_depth > 1) {
|
if (opt_depth > 1) {
|
||||||
errno = EUNBALBRACK;
|
/* Unbalanced bracket */
|
||||||
free(result);
|
free(result);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!okay[0]) {
|
if (!okay[0]) {
|
||||||
errno = EUNDEFVAR;
|
/* Undefined variable and we aren't in a bracket */
|
||||||
free(result);
|
free(result);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user