diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-03 10:31:02 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-03 10:31:02 +0200 |
commit | c3cac7a521857747771f661d607004f58470e0cc (patch) | |
tree | 91a9058a1000a121a7c89dd7869c866b4d63ca80 /get-contact-sites.c | |
parent | First commmit (diff) | |
download | contacts-c3cac7a521857747771f661d607004f58470e0cc.tar.gz contacts-c3cac7a521857747771f661d607004f58470e0cc.tar.bz2 contacts-c3cac7a521857747771f661d607004f58470e0cc.tar.xz |
Use strcmpnul
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'get-contact-sites.c')
-rw-r--r-- | get-contact-sites.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/get-contact-sites.c b/get-contact-sites.c index 6627cc3..7208d9f 100644 --- a/get-contact-sites.c +++ b/get-contact-sites.c @@ -59,9 +59,9 @@ main(int argc, char *argv[]) ret = 1; } else { for (sites = contact.sites; (site = *sites); sites++) { - if (lookup_ctx && (!site->context || strcmp(site->context, lookup_ctx))) + if (lookup_ctx && strcmpnul(site->context, lookup_ctx)) continue; - if (lookup_addr && (!site->address || strcmp(site->address, lookup_addr))) + if (lookup_addr && strcmpnul(site->address, lookup_addr)) continue; if (lookup_ctx && lookup_addr && !display_ctx && !display_addr) { printf("%s\n", *argv); |