summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_purp.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509v3/v3_purp.c')
-rw-r--r--crypto/x509v3/v3_purp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c
index ed634cb2f5..beb8b2f870 100644
--- a/crypto/x509v3/v3_purp.c
+++ b/crypto/x509v3/v3_purp.c
@@ -172,7 +172,7 @@ int X509_PURPOSE_get_by_sname(char *sname)
X509_PURPOSE *xptmp;
for (i = 0; i < X509_PURPOSE_get_count(); i++) {
xptmp = X509_PURPOSE_get0(i);
- if (!strcmp(xptmp->sname, sname))
+ if (strcmp(xptmp->sname, sname) == 0)
return i;
}
return -1;