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/recur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index 5fb30b9..d12dcc3 100644 --- a/src/recur.c +++ b/src/recur.c @@ -943,7 +943,7 @@ recur_repeat_item (void) status_mesg (_(outstr), ""); if (getstring (win[STA].p, user_input, BUFSIZ, 0, 1) == GETSTRING_VALID) { - if (strlen (user_input) == 1 && strncmp (user_input, "0", 1) == 0) + if (strlen (user_input) == 1 && strcmp (user_input, "0") == 0) { until = 0; date_entered = 1; -- cgit v1.2.3-54-g00ecf