* src/wget.c (program_deinit): Minor cleanup

This commit is contained in:
Tim Rühsen
2024-10-31 19:45:15 +01:00
parent c7ed8afc08
commit c19ea83788

View File

@ -361,10 +361,10 @@ static void program_deinit(void)
* E.g. if 'dir' is `/something', match_subdir() will return true if and
* only if 'subdir' begins with `/something/' or is exactly '/something'.
*/
static bool match_subdir(const char *dir, const char *subdir, char ignore_case)
static bool match_subdir(const char *dir, const char *subdir, bool ignore_case)
{
if (*dir == '\0')
return (strcmp(subdir, "/")) ? false : true;
return strcmp(subdir, "/") == 0;
if (ignore_case)
for (; *dir && *subdir && (c_tolower(*dir) == c_tolower(*subdir)); ++dir, ++subdir)