diff options
| author | bings <bings@codeaurora.org> | 2016-09-09 10:19:37 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-09-14 13:36:30 +0530 |
| commit | 79fe8291bf1e25753a8045e9ecc25c77175074ca (patch) | |
| tree | cf32a461c0fd2057b703f7265b53305e6b541985 | |
| parent | 96c184eb574eb4e6dc05a5e57f5c090b8e6ffd33 (diff) | |
qcacld-2.0: Remove ambiguous NULL check for pointer 'str'
Pointer 'str' NULL check is only needed before it is parsed in
hdd_string_to_string_array. The more NULL check for pointer
'str' is useless and harmful. Generally speaking, The more check
indirectly shows the compiler a wrong state, pointer 'str' can
be NULL. Then compiler will complain if the following code part
has pointer 'str' dereferenced.
Fix is to remove ambiguous NULL check for pointer 'str'.
Change-Id: Ia518b71e73e7345641319dd0891ee769eb3e26d1
CRs-Fixed: 1064476
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 372207a46a3e..7b4a28a775a4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -6433,7 +6433,7 @@ VOS_STATUS hdd_string_to_string_array(char *data, uint8_t *datalist, /* parse the string */ while (str && ('\0' != *str) && (num < max_entries)) { field = str; - while (str && ('\0' != *str) && (separator != *str)) + while (('\0' != *str) && (separator != *str)) str++; if ('\0' == *str) { /* reach the end of string */ |
