summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2001-12-02 23:23:12 +0000
committerPeter Johnson <peter@tortall.net>2001-12-02 23:23:12 +0000
commitf36a664a4929db96815bd16b6acdfd4d19c9d38e (patch)
tree3206e841d14d7fa4193440de33551966cca12850
parent6bbcad2e6c5841e7bb9602e322ac7bebc2801f41 (diff)
downloadyasm-f36a664a4929db96815bd16b6acdfd4d19c9d38e.tar.gz
strcmp() returns 0 if the strings are equal.
svn path=/trunk/yasm/; revision=382
-rw-r--r--libyasm/file.c2
-rw-r--r--src/file.c2
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);
diff --git a/src/file.c b/src/file.c
index 54c5534a..21a8f556 100644
--- a/src/file.c
+++ b/src/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);