summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_itest.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/common/cmd_itest.c b/common/cmd_itest.c
index fa6a0c3..2a238a4 100644
--- a/common/cmd_itest.c
+++ b/common/cmd_itest.c
@@ -94,16 +94,13 @@ static char * evalstr(char *s)
static int stringcomp(char *s, char *t, int op)
{
- int n, p;
+ int p;
char *l, *r;
l = evalstr(s);
r = evalstr(t);
- /* we'll do a compare based on the length of the shortest string */
- n = min(strlen(l), strlen(r));
-
- p = strncmp(l, r, n);
+ p = strcmp(l, r);
switch (op) {
case EQ: return (p == 0);
case NE: return (p != 0);