Inverse condition to avoid nesting in test(1)
This commit is contained in:
parent
c55948ba91
commit
af1fb0c9c2
4
test.c
4
test.c
|
@ -113,7 +113,8 @@ binary(const char *arg1, const char *op, const char *arg2)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < LEN(optexts); i++) {
|
for (i = 0; i < LEN(optexts); i++) {
|
||||||
if (strcmp(op, optexts[i]) == 0) {
|
if (strcmp(op, optexts[i]) != 0)
|
||||||
|
continue;
|
||||||
oper = i;
|
oper = i;
|
||||||
switch (oper) {
|
switch (oper) {
|
||||||
case STREQ:
|
case STREQ:
|
||||||
|
@ -141,7 +142,6 @@ binary(const char *arg1, const char *op, const char *arg2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user