diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 14:56:14 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-06 22:37:53 -0400 |
commit | 86885c289580066792415218754bd935b449f170 (patch) | |
tree | 8cab1bdeb50bfee21ce6677d9150c8d385379321 /apps/speed.c | |
parent | dab18ab596acb35eff2545643e25757e4f9cd777 (diff) | |
download | openssl-86885c289580066792415218754bd935b449f170.tar.gz |
Use "==0" instead of "!strcmp" etc
For the various string-compare routines (strcmp, strcasecmp, str.*cmp)
use "strcmp()==0" instead of "!strcmp()"
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/speed.c')
-rw-r--r-- | apps/speed.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/speed.c b/apps/speed.c index 00c7c4115e..9ab1648b2c 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2327,7 +2327,7 @@ static int do_multi(int multi) continue; } printf("Got: %s from %d\n", buf, n); - if (!strncmp(buf, "+F:", 3)) { + if (strncmp(buf, "+F:", 3) == 0) { int alg; int j; @@ -2336,7 +2336,7 @@ static int do_multi(int multi) sstrsep(&p, sep); for (j = 0; j < SIZE_NUM; ++j) results[alg][j] += atof(sstrsep(&p, sep)); - } else if (!strncmp(buf, "+F2:", 4)) { + } else if (strncmp(buf, "+F2:", 4) == 0) { int k; double d; @@ -2357,7 +2357,7 @@ static int do_multi(int multi) rsa_results[k][1] = d; } # ifndef OPENSSL_NO_DSA - else if (!strncmp(buf, "+F3:", 4)) { + else if (strncmp(buf, "+F3:", 4) == 0) { int k; double d; @@ -2379,7 +2379,7 @@ static int do_multi(int multi) } # endif # ifndef OPENSSL_NO_EC - else if (!strncmp(buf, "+F4:", 4)) { + else if (strncmp(buf, "+F4:", 4) == 0) { int k; double d; @@ -2404,7 +2404,7 @@ static int do_multi(int multi) # endif # ifndef OPENSSL_NO_EC - else if (!strncmp(buf, "+F5:", 4)) { + else if (strncmp(buf, "+F5:", 4) == 0) { int k; double d; @@ -2421,7 +2421,7 @@ static int do_multi(int multi) } # endif - else if (!strncmp(buf, "+H:", 3)) { + else if (strncmp(buf, "+H:", 3) == 0) { ; } else fprintf(stderr, "Unknown type '%s' from child %d\n", buf, n); |