From c3cac7a521857747771f661d607004f58470e0cc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 3 Apr 2021 10:31:02 +0200 Subject: Use strcmpnul MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- find-contact-by-pgpkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'find-contact-by-pgpkey.c') 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); -- cgit v1.2.3-70-g09d2