diff options
author | Peter Johnson <peter@tortall.net> | 2001-12-02 23:23:12 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2001-12-02 23:23:12 +0000 |
commit | f36a664a4929db96815bd16b6acdfd4d19c9d38e (patch) | |
tree | 3206e841d14d7fa4193440de33551966cca12850 | |
parent | 6bbcad2e6c5841e7bb9602e322ac7bebc2801f41 (diff) | |
download | yasm-f36a664a4929db96815bd16b6acdfd4d19c9d38e.tar.gz |
strcmp() returns 0 if the strings are equal.
svn path=/trunk/yasm/; revision=382
-rw-r--r-- | libyasm/file.c | 2 | ||||
-rw-r--r-- | src/file.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libyasm/file.c b/libyasm/file.c index 54c5534a..21a8f556 100644 --- a/libyasm/file.c +++ b/libyasm/file.c @@ -41,7 +41,7 @@ replace_extension(const char *orig, const char *ext, const char *def) * (as we don't want to overwrite the source file). */ outext++; /* advance past '.' */ - if (strcmp(outext, ext)) { + if (strcmp(outext, ext) == 0) { outext = NULL; /* indicate default should be used */ WarningNow(_("file name already ends in `.%s': output will be in `%s'"), ext, def); @@ -41,7 +41,7 @@ replace_extension(const char *orig, const char *ext, const char *def) * (as we don't want to overwrite the source file). */ outext++; /* advance past '.' */ - if (strcmp(outext, ext)) { + if (strcmp(outext, ext) == 0) { outext = NULL; /* indicate default should be used */ WarningNow(_("file name already ends in `.%s': output will be in `%s'"), ext, def); |