diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-03-01 23:15:38 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-03-12 20:36:22 +0100 |
commit | 2c9499bf272e06a62902711c6c20621ef3f80e64 (patch) | |
tree | 6c71560531acf606557a586fa3cdf712e55b2960 /src/recur.c | |
parent | 7072c9c88a5d54b3f22256e6cf0015e1900374da (diff) | |
download | calcurse-2c9499bf272e06a62902711c6c20621ef3f80e64.zip |
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/recur.c')
-rw-r--r-- | src/recur.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |