Explicitly test against NULL; do not use !p or similar
[openssl.git] / crypto / ocsp / ocsp_ht.c
index c75bfdb403672ec54e0ce41660fda9f293865aee..fa147f3b1692594f44e599603b63dd3d3c79fc29 100644 (file)
@@ -142,7 +142,7 @@ int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path)
 {
     static const char http_hdr[] = "%s %s HTTP/1.0\r\n";
 
-    if (!path)
+    if (path == NULL)
         path = "/";
 
     if (BIO_printf(rctx->mem, http_hdr, op, path) <= 0)
@@ -211,7 +211,7 @@ static int parse_http_line1(char *line)
 
     for (p = line; *p && !ossl_isspace(*p); p++)
         continue;
-    if (!*p) {
+    if (*p == '\0') {
         OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
         return 0;
     }
@@ -220,7 +220,7 @@ static int parse_http_line1(char *line)
     while (*p && ossl_isspace(*p))
         p++;
 
-    if (!*p) {
+    if (*p == '\0') {
         OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
         return 0;
     }
@@ -229,7 +229,7 @@ static int parse_http_line1(char *line)
     for (q = p; *q && !ossl_isspace(*q); q++)
         continue;
 
-    if (!*q) {
+    if (*q == '\0') {
         OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
         return 0;
     }
@@ -258,7 +258,7 @@ static int parse_http_line1(char *line)
     }
     if (retcode != 200) {
         OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_ERROR);
-        if (!*q)
+        if (*q == '\0')
             ERR_add_error_data(2, "Code=", p);
         else
             ERR_add_error_data(4, "Code=", p, ",Reason=", q);