]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ssl: remove useless check on p in openssl_version_parser()
authorWilliam Lallemand <wlallemand@haproxy.org>
Sun, 22 Aug 2021 11:36:11 +0000 (13:36 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Sun, 22 Aug 2021 11:36:11 +0000 (13:36 +0200)
Remove a  useless check on a pointer which reports a NULL dereference on
coverity.

Fixes issue #1358.

src/ssl_utils.c

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