]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/bio/bss_mem.c
Use p==NULL not !p (in if statements, mainly)
[thirdparty/openssl.git] / crypto / bio / bss_mem.c
index 56e0d2e3232f12c1246accd00a87d1f72c754b5b..c55344d320cda43b73acb612748bdb8a4484e166 100644 (file)
@@ -97,12 +97,12 @@ BIO *BIO_new_mem_buf(void *buf, int len)
     BUF_MEM *b;
     size_t sz;
 
-    if (!buf) {
+    if (buf == NULL) {
         BIOerr(BIO_F_BIO_NEW_MEM_BUF, BIO_R_NULL_PARAMETER);
         return NULL;
     }
     sz = (len < 0) ? strlen(buf) : (size_t)len;
-    if (!(ret = BIO_new(BIO_s_mem())))
+    if ((ret = BIO_new(BIO_s_mem())) == NULL)
         return NULL;
     b = (BUF_MEM *)ret->ptr;
     b->data = buf;