aboutsummaryrefslogtreecommitdiffstats
path: root/src/shvar.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2000-02-01 15:30:42 +0000
committerNalin Dahyabhai <nalin@redhat.com>2000-02-01 15:30:42 +0000
commit9b778aa3a21fe4c8021aefe8aa775e06114d8e5e (patch)
treeb64d24028e9949988a0eb2838b47d67fd008b43e /src/shvar.c
parent5f484aa1408dcd491af8ac72584b6b08c820c3df (diff)
downloadinitscripts-9b778aa3a21fe4c8021aefe8aa775e06114d8e5e.tar
initscripts-9b778aa3a21fe4c8021aefe8aa775e06114d8e5e.tar.gz
initscripts-9b778aa3a21fe4c8021aefe8aa775e06114d8e5e.tar.bz2
initscripts-9b778aa3a21fe4c8021aefe8aa775e06114d8e5e.tar.xz
initscripts-9b778aa3a21fe4c8021aefe8aa775e06114d8e5e.zip
shvar cleanupr4-87
Diffstat (limited to 'src/shvar.c')
-rw-r--r--src/shvar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shvar.c b/src/shvar.c
index 9b1d8f92..c329d2e8 100644
--- a/src/shvar.c
+++ b/src/shvar.c
@@ -51,7 +51,7 @@ svNewFile(char *name)
if (s->fd == -1) {
/* try read-only */
s->fd = open(name, O_RDONLY); /* NOT O_CREAT */
- if (s->fd) closefd = 1;
+ if (s->fd != -1) closefd = 1;
}
s->fileName = g_strdup(name);
@@ -72,9 +72,9 @@ svNewFile(char *name)
close(s->fd);
s->fd = -1;
}
- }
- return s;
+ return s;
+ }
bail:
if (s->fd != -1) close(s->fd);