CLEANUP: ssl: remove useless check on p in openssl_version_parser()

Remove a  useless check on a pointer which reports a NULL dereference on
coverity.

Fixes issue #1358.
This commit is contained in:
William Lallemand 2021-08-22 13:36:11 +02:00
parent 3aeb3f9347
commit 8b673f0fe3

View File

@ -373,11 +373,9 @@ unsigned int openssl_version_parser(const char *version)
if (!strncmp(p, "beta", 4)) { if (!strncmp(p, "beta", 4)) {
p += 4; p += 4;
if (p) { status = strtol(p, &end, 10);
status = strtol(p, &end, 10); if (status > 14)
if (status > 14) goto error;
goto error;
}
} }
} else { } else {
/* that's a patch release */ /* that's a patch release */