Browse Source

Removed redundant NULL check for b in wpabuf_concat()

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Nishant Chaprana 8 years ago
parent
commit
230b2b2c3d
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/utils/wpabuf.c

+ 2 - 4
src/utils/wpabuf.c

@@ -244,15 +244,13 @@ struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b)
 
 	if (a)
 		len += wpabuf_len(a);
-	if (b)
-		len += wpabuf_len(b);
+	len += wpabuf_len(b);
 
 	n = wpabuf_alloc(len);
 	if (n) {
 		if (a)
 			wpabuf_put_buf(n, a);
-		if (b)
-			wpabuf_put_buf(n, b);
+		wpabuf_put_buf(n, b);
 	}
 
 	wpabuf_free(a);