From: Purushottam Kushwaha
Date: Fri, 21 Aug 2015 09:56:05 +0000 (+0000)
Subject: P2PS: Remove redundant check in for loop
X-Git-Tag: hostap_2_5~102
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=658665551c653f0445d8c2a25b032f215ff8b2d9;p=thirdparty%2Fhostap.git
P2PS: Remove redundant check in for loop
Signed-off-by: Purushottam Kushwaha
Signed-off-by: Mayank Haarit
---
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 8cf0b9c6d..767706c01 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -1132,7 +1132,7 @@ static int p2ps_gen_hash(struct p2p_data *p2p, const char *str, u8 *hash)
if (adv_len >= sizeof(str_buf))
return 0;
- for (i = 0; str[i] && i < adv_len; i++) {
+ for (i = 0; i < adv_len; i++) {
if (str[i] >= 'A' && str[i] <= 'Z')
str_buf[i] = str[i] - 'A' + 'a';
else