initrd: avoid coverity warning in parse_ip() about "Dereference before null check"

get_word() only moves the "argument" pointer forward. It never sets it
to %NULL. Also, above we already dereference argument, so Coverity thinks
that this NULL check indicates a bug.

Drop it to silence Coverity.

(cherry picked from commit 4596d7793c)
This commit is contained in:
Thomas Haller 2019-08-02 09:24:01 +02:00
parent c347e81a1d
commit 2ecc7e8cb5

View file

@ -244,7 +244,7 @@ parse_ip (GHashTable *connections, const char *sysfs_dir, char *argument)
dns[0] = tmp;
dns[1] = get_word (&argument, ':');
dns_addr_family[1] = guess_ip_address_family (dns[1]);
if (argument && *argument)
if (*argument)
_LOGW (LOGD_CORE, "Ignoring extra: '%s'.", argument);
} else {
mtu = tmp;