runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 6a812c1c8587e05d0d4b00ac4618bf407c9e0f05
parent 966addf718a51eb34e27ac4e20c26ba7fef18b9c
Author: Gerrit Pape <pape@smarden.org>
Date:   Thu, 24 Sep 2009 21:27:54 +0000

  * chpst.c, svwaitdown.c, svwaitup.c: fix checks for return value of
    open_* functions (thx David Reiss).

Diffstat:
Mpackage/CHANGES | 2++
Msrc/chpst.c | 2+-
Msrc/svwaitdown.c | 2+-
Msrc/svwaitup.c | 2+-
4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/CHANGES b/package/CHANGES @@ -4,6 +4,8 @@ 0th argument. * sv.c: fix exit code of status command in lsb mode (thx Mathieu Poumeyrol) + * chpst.c, svwaitdown.c, svwaitup.c: fix checks for return value of + open_* functions (thx David Reiss). 2.0.0 Sun, 15 Jun 2008 15:31:05 +0000 diff --git 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 @@ -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 @@ -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;