diff --git a/libretro-common/compat/compat.c b/libretro-common/compat/compat.c index 6adb54cb61..77b898bd4c 100644 --- a/libretro-common/compat/compat.c +++ b/libretro-common/compat/compat.c @@ -129,7 +129,7 @@ static int parse_long(const struct option *longopts, char * const *argv) const struct option *opt = NULL; for (indice = 0; longopts[indice].name; indice++) { - if (strcmp(longopts[indice].name, &argv[0][2]) == 0) + if (!strcmp(longopts[indice].name, &argv[0][2])) { opt = &longopts[indice]; break; diff --git a/libretro-common/file/dir_list.c b/libretro-common/file/dir_list.c index 3eb108363f..38a512a100 100644 --- a/libretro-common/file/dir_list.c +++ b/libretro-common/file/dir_list.c @@ -163,7 +163,7 @@ static int parse_dir_entry(const char *name, char *file_path, if (!include_dirs && is_dir) return 1; - if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) + if (!strcmp(name, ".") || !strcmp(name, "..")) return 1; if (!is_compressed_file && !is_dir && ext_list && !supported_by_core) diff --git a/libretro-common/utils/md5.c b/libretro-common/utils/md5.c index 3695cb7889..e1863a6269 100644 --- a/libretro-common/utils/md5.c +++ b/libretro-common/utils/md5.c @@ -509,9 +509,9 @@ int main (int argc, char *argv[]) for (i = 1; i < argc; i++) if (argv[i][0] == '-' && argv[i][1] == 's') MDString (argv[i] + 2); - else if (strcmp (argv[i], "-t") == 0) + else if (!strcmp (argv[i], "-t")) MDTimeTrial (); - else if (strcmp (argv[i], "-x") == 0) + else if (!strcmp (argv[i], "-x")) MDTestSuite (); else MDFile (argv[i]);