diff options
author | Gerrit Pape <pape@smarden.org> | 2009-09-24 21:27:54 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2009-09-24 22:06:30 +0000 |
commit | e85e4f3238c022b89d130cb4765282ed7f0b183c (patch) | |
tree | c042d4482eca02e5f00676fdedd83acff37f1121 /src | |
parent | 189d39c0b60a49d32b38d91ca94700de0fabbb99 (diff) | |
download | runit-e85e4f3238c022b89d130cb4765282ed7f0b183c.tar.gz runit-e85e4f3238c022b89d130cb4765282ed7f0b183c.tar.xz runit-e85e4f3238c022b89d130cb4765282ed7f0b183c.zip |
* chpst.c, svwaitdown.c, svwaitup.c: fix checks for return value of
open_* functions (thx David Reiss).
Diffstat (limited to 'src')
-rw-r--r-- | src/chpst.c | 2 | ||||
-rw-r--r-- | src/svwaitdown.c | 2 | ||||
-rw-r--r-- | src/svwaitup.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/chpst.c b/src/chpst.c index 6518c55..f279d44 100644 --- a/src/chpst.c +++ b/src/chpst.c @@ -110,7 +110,7 @@ void edir(const char *dirname) { direntry *d; int i; - if (! (wdir =open_read("."))) + if ((wdir =open_read(".")) == -1) fatal("unable to open current working directory"); if (chdir(dirname)) fatal2("unable to switch to directory", dirname); if (! (dir =opendir("."))) fatal2("unable to open directory", dirname); diff --git a/src/svwaitdown.c b/src/svwaitdown.c index 26b815f..6cd3efc 100644 --- a/src/svwaitdown.c +++ b/src/svwaitdown.c @@ -65,7 +65,7 @@ int main(int argc, const char * const *argv) { argv +=optind; if (! argv || ! *argv) usage(); - if (! (wdir =open_read("."))) + if ((wdir =open_read(".")) == -1) fatal("unable to open current working directory"); for (dir =argv; *dir; ++dir) { diff --git a/src/svwaitup.c b/src/svwaitup.c index b7f21e8..e2d6c57 100644 --- a/src/svwaitup.c +++ b/src/svwaitup.c @@ -58,7 +58,7 @@ int main(int argc, const char * const *argv) { argv +=optind; if (! argv || ! *argv) usage(); - if (! (wdir =open_read("."))) + if ((wdir =open_read(".")) == -1) fatal("unable to open current working directory"); dir =argv; |