aboutsummaryrefslogtreecommitdiffstats
path: root/find-contact-by-name.c
diff options
context:
space:
mode:
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]);