diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-03-04 08:51:36 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-03-04 08:54:01 +0100 |
commit | 061f74108b9bfc89126154a461c697a118fe1acb (patch) | |
tree | ef70c307c7a91b83697578c49df19bd0dbfb8572 /src/utils.c | |
parent | 05900b62e903f54bec2866a4cccaf049783af3c8 (diff) | |
download | calcurse-061f74108b9bfc89126154a461c697a118fe1acb.zip |
Simplify str_toupper() in "utils.c".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils.c b/src/utils.c index 00fafea..630b6bf 100644 --- a/src/utils.c +++ b/src/utils.c @@ -957,14 +957,11 @@ parse_date (char *date_string, enum datefmt datefmt, int *year, int *month, return 1; } -char * +void str_toupper (char *s) { - int len; - - for (len = 0; s && s[len]; len++) - s[len] = toupper (s[len]); - return s; + if (!s) return; + for (; *s; s++) *s = toupper (*s); } void |