aboutsummaryrefslogtreecommitdiffstats
path: root/get-contact-organisations.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 /get-contact-organisations.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 '')
-rw-r--r--get-contact-organisations.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/get-contact-organisations.c b/get-contact-organisations.c
index c16b333..3441f55 100644
--- a/get-contact-organisations.c
+++ b/get-contact-organisations.c
@@ -59,9 +59,9 @@ main(int argc, char *argv[])
ret = 1;
} else {
for (orgs = contact.organisations; (org = *orgs); orgs++) {
- if (lookup_org && (!org->organisation || strcmp(org->organisation, lookup_org)))
+ if (lookup_org && strcmpnul(org->organisation, lookup_org))
continue;
- if (lookup_title && (!org->title || strcmp(org->title, lookup_title)))
+ if (lookup_title && strcmpnul(org->title, lookup_title))
continue;
if (lookup_org && lookup_title && !display_org && !display_title) {
printf("%s\n", *argv);