diff options
Diffstat (limited to 'src/basic/ether-addr-util.c')
-rw-r--r-- | src/basic/ether-addr-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/ether-addr-util.c b/src/basic/ether-addr-util.c index d94bdbd149..bbe8bf0006 100644 --- a/src/basic/ether-addr-util.c +++ b/src/basic/ether-addr-util.c @@ -71,7 +71,7 @@ int ether_addr_from_string(const char *s, struct ether_addr *ret, size_t *offset if (s[pos] == '\0') \ break; \ hexoff = strchr(hex, s[pos]); \ - if (hexoff == NULL) \ + if (!hexoff) \ break; \ assert(hexoff >= hex); \ x = hexoff - hex; \ @@ -99,7 +99,7 @@ int ether_addr_from_string(const char *s, struct ether_addr *ret, size_t *offset sep = s[strspn(s, hex)]; if (sep == '\n') return -EINVAL; - if (strchr(":.-", sep) == NULL) + if (!strchr(":.-", sep)) return -EINVAL; if (sep == '.') { |