[PATCH] Remove redundant check in for loop
Purushottam Kushwaha
p.kushwaha
Fri Aug 21 02:56:05 PDT 2015
Signed-off-by: Purushottam Kushwaha <p.kushwaha at samsung.com>
Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
---
src/p2p/p2p.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index ef9adb5..de69bc9 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
--
1.9.1
More information about the Hostap
mailing list