aboutsummaryrefslogtreecommitdiffstats
path: root/find-contact-by-site.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-03 10:31:02 +0200
committerMattias Andrée <maandree@kth.se>2021-04-03 10:31:02 +0200
commitc3cac7a521857747771f661d607004f58470e0cc (patch)
tree91a9058a1000a121a7c89dd7869c866b4d63ca80 /find-contact-by-site.c
parentFirst commmit (diff)
downloadcontacts-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 'find-contact-by-site.c')
-rw-r--r--find-contact-by-site.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/find-contact-by-site.c b/find-contact-by-site.c
index afda922..7c21777 100644
--- a/find-contact-by-site.c
+++ b/find-contact-by-site.c
@@ -42,7 +42,7 @@ main(int argc, char *argv[])
for (; (site = *sites); sites++) {
if (!site->address)
continue;
- if (context && (!site->context || strcmp(site->context, context)))
+ if (context && strcmpnul(site->context, context))
continue;
if (list)
printf("%s (%s)\n", contacts[i]->id, site->address);