aboutsummaryrefslogtreecommitdiffstats
path: root/find-contact-by-pgpkey.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-pgpkey.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-pgpkey.c')
-rw-r--r--find-contact-by-pgpkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/find-contact-by-pgpkey.c b/find-contact-by-pgpkey.c
index 85d2202..94c312f 100644
--- a/find-contact-by-pgpkey.c
+++ b/find-contact-by-pgpkey.c
@@ -42,7 +42,7 @@ main(int argc, char *argv[])
for (; (pgpkey = *pgpkeys); pgpkeys++) {
if (!pgpkey->id)
continue;
- if (context && (!pgpkey->context || strcmp(pgpkey->context, context)))
+ if (context && strcmpnul(pgpkey->context, context))
continue;
if (list)
printf("%s (%s)\n", contacts[i]->id, pgpkey->id);