From 2c9499bf272e06a62902711c6c20621ef3f80e64 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 1 Mar 2012 23:15:38 +0100 Subject: Use strcmp() instead of strncmp() strncmp() isn't intended to be a secure strcmp() replacement, it is designed to be used if you want to compare the first n characters of two strings. Since we always compare character pointers with string literals, switch to using strcmp() everywhere. Signed-off-by: Lukas Fleischer --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index e477014..d756d62 100644 --- a/src/utils.c +++ b/src/utils.c @@ -418,7 +418,7 @@ item_in_popup (char *saved_a_start, char *saved_a_end, char *msg, pad = newpad (padl, padw); popup_win = popup (winl, winw, 1, 2, pop_title, NULL, 1); - if (strncmp (pop_title, _("Appointment"), 11) == 0) + if (strcmp (pop_title, _("Appointment")) == 0) { mvwprintw (popup_win, margin_top, margin_left, "- %s -> %s", saved_a_start, saved_a_end); -- cgit v1.2.3-54-g00ecf