diff --git a/compat/mingw.c b/compat/mingw.c index ef9721fea21b5d..df827b7d20c64c 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2228,12 +2228,12 @@ void mingw_startup() __argv[i] = wcstoutfdup_startup(buffer, wargv[i], maxlen); for (i = 0; wenv[i]; i++) { environ[i] = wcstoutfdup_startup(buffer, wenv[i], maxlen); - if (strncasecmp(environ[i], "MSYS2_TZ=", 9)) { + if (strncasecmp(environ[i], "MSYS2_TZ=", 9) == 0) { char *to_free = environ[i]; environ[i] = xstrdup(to_free + 6); free(to_free); } - if (strncasecmp(environ[i], "TMP=", 4)) { + if (strncasecmp(environ[i], "TMP=", 4) == 0) { /* * Convert all dir separators to forward slashes, * to help shell commands called from the Git