diff mbox

Removed redundant NULL check for b in wpabuf_concat()

Message ID 1477636924-8583-1-git-send-email-n.chaprana@samsung.com
State Accepted
Headers show

Commit Message

Nishant Chaprana Oct. 28, 2016, 6:42 a.m. UTC
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
---
 src/utils/wpabuf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jouni Malinen Oct. 28, 2016, 10:34 p.m. UTC | #1
Thanks, applied.
diff mbox

Patch

diff --git a/src/utils/wpabuf.c b/src/utils/wpabuf.c
index 96cb25c..ad7e01b 100644
--- a/src/utils/wpabuf.c
+++ b/src/utils/wpabuf.c
@@ -244,15 +244,15 @@  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);