Bugfix from Fredrik Hubinette <hubbe@hubbe.net>.
authorjbj <devnull@localhost>
Thu, 16 Jul 1998 14:23:41 +0000 (14:23 +0000)
committerjbj <devnull@localhost>
Thu, 16 Jul 1998 14:23:41 +0000 (14:23 +0000)
CVS patchset: 2171
CVS date: 1998/07/16 14:23:41

CHANGES
build.c

diff --git a/CHANGES b/CHANGES
index 04c548f..92787a0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
 2.5.3 -> 3.0
+       - build.c: fix incorrect check for successful open
        - add new fully recursive macro.c
        - add {init,add,expand}Macro args everywhere (new macro.c compatibility)
        - create /usr/lib/rpm directory and move rpmrc et al there
diff --git a/build.c b/build.c
index 33bf2d7..f60cf14 100644 (file)
--- a/build.c
+++ b/build.c
@@ -118,7 +118,7 @@ int build(char *arg, int buildAmount, char *passPhrase,
        return 1;
     }
     
-    if (!(fd = open(specfile, O_RDONLY))) {
+    if ((fd = open(specfile, O_RDONLY)) < 0) {
        fprintf(stderr, _("Unable to open spec file: %s\n"), specfile);
        return 1;
     }