Inverse condition to avoid nesting in test(1)
This commit is contained in:
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user