diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2000-02-01 15:30:42 +0000 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2000-02-01 15:30:42 +0000 |
commit | 9b778aa3a21fe4c8021aefe8aa775e06114d8e5e (patch) | |
tree | b64d24028e9949988a0eb2838b47d67fd008b43e /src/shvar.c | |
parent | 5f484aa1408dcd491af8ac72584b6b08c820c3df (diff) | |
download | initscripts-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.c | 6 |
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); |