wpa_supplicant: Remove unfeasible conditions in config parsing
pos can't be NULL in wpa_global_config_parse_str(), so there is no point checking this, especially when pos was already dereferenced earlier. Remove the redundant conditions. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
ff7e0c1cf7
commit
b4c7114cf5
1 changed files with 1 additions and 3 deletions
|
@ -4469,9 +4469,7 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data,
|
||||||
prev_len = 0;
|
prev_len = 0;
|
||||||
|
|
||||||
/* No change to the previously configured value */
|
/* No change to the previously configured value */
|
||||||
if ((!(*dst) && !pos) ||
|
if (*dst && prev_len == len && os_memcmp(*dst, pos, len) == 0)
|
||||||
(*dst && pos && prev_len == len &&
|
|
||||||
os_memcmp(*dst, pos, len) == 0))
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
tmp = os_strdup(pos);
|
tmp = os_strdup(pos);
|
||||||
|
|
Loading…
Reference in a new issue