aboutsummaryrefslogtreecommitdiffstats
path: root/find-contact-by-name.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-name.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-name.c')
-rw-r--r--find-contact-by-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/find-contact-by-name.c b/find-contact-by-name.c
index d99f0a8..4b4b8c1 100644
--- a/find-contact-by-name.c
+++ b/find-contact-by-name.c
@@ -59,7 +59,7 @@ main(int argc, char *argv[])
if (list) {
if (name)
printf("%s (%s)\n", contacts[i]->id, name);
- } else if (name && !strcmp(name, argv[0])) {
+ } else if (!strcmpnul(name, argv[0])) {
printf("%s\n", contacts[i]->id);
}
libcontacts_contact_destroy(contacts[i]);