From de73d9618815b2ff0c19198b4fede0bc60f00d4e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 22 Dec 2012 17:25:00 +0100 Subject: Use strncasecmp() for case-insensitive comparison Instead of converting everything to upper case and then using strncmp(), use strncasecmp() which does case-insensitive comparison out of the box. Signed-off-by: Lukas Fleischer --- src/utils.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 0826f89..056c39b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -845,14 +845,6 @@ int parse_duration(const char *string, unsigned *duration) return 1; } -void str_toupper(char *s) -{ - if (!s) - return; - for (; *s; s++) - *s = toupper(*s); -} - void file_close(FILE * f, const char *pos) { EXIT_IF((fclose(f)) != 0, _("Error when closing file at %s"), pos); -- cgit v1.2.3-54-g00ecf