]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Removed redundant NULL check for b in wpabuf_concat()
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 28 Oct 2016 06:42:04 +0000 (12:12 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2016 16:05:08 +0000 (19:05 +0300)
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
src/utils/wpabuf.c

index 96cb25cc1764b5be4095067b88a90eea9eada1d4..77ee47288007df77533fda57ced3783000e374dd 100644 (file)
@@ -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);