summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewt <devnull@localhost>1998-03-23 20:42:40 +0000
committerewt <devnull@localhost>1998-03-23 20:42:40 +0000
commitab9e98d3e3d9d1cdadabbdeb172b49d3ad79c010 (patch)
treebdf36e468c6cda65de5e2e9b29c2a067551d08b1
parent36f4818c99398201153fbacab968811f30c7497d (diff)
downloadlibrpm-tizen-ab9e98d3e3d9d1cdadabbdeb172b49d3ad79c010.tar.gz
librpm-tizen-ab9e98d3e3d9d1cdadabbdeb172b49d3ad79c010.tar.bz2
librpm-tizen-ab9e98d3e3d9d1cdadabbdeb172b49d3ad79c010.zip
didn't work when open() returned stdin
CVS patchset: 2046 CVS date: 1998/03/23 20:42:40
-rw-r--r--lib/rpmrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index d79cbaf22..763b106db 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -485,7 +485,7 @@ int rpmReadRC(char * file) {
}
fd = open(LIBRPMRC_FILENAME, O_RDONLY);
- if (fd > 0) {
+ if (fd >= 0) {
rc = doReadRC(fd, LIBRPMRC_FILENAME);
close(fd);
if (rc) return rc;
@@ -501,7 +501,7 @@ int rpmReadRC(char * file) {
fn = "/etc/rpmrc";
fd = open(fn, O_RDONLY);
- if (fd > 0) {
+ if (fd >= 0) {
rc = doReadRC(fd, fn);
close(fd);
if (rc) return rc;
@@ -518,7 +518,7 @@ int rpmReadRC(char * file) {
strcpy(fn, home);
strcat(fn, "/.rpmrc");
fd = open(fn, O_RDONLY);
- if (fd > 0) {
+ if (fd >= 0) {
rc |= doReadRC(fd, fn);
close(fd);
if (rc) return rc;