diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 12:12:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:47 +0100 |
commit | f762bed1bddcc76a086a126bbafec816a16ddc7b (patch) | |
tree | 26c3dfd315fbdcd4e259132fa59437a4cd3837eb /sal | |
parent | These should probably use OBJRET_FILE_OK instead of true (diff) | |
download | core-f762bed1bddcc76a086a126bbafec816a16ddc7b.tar.gz core-f762bed1bddcc76a086a126bbafec816a16ddc7b.zip |
Use bool
Change-Id: I4349f4560ca34610351f4f07ff6e406e09b488e7
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/process.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 810ad5d4855a..ee6346899840 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -1150,7 +1150,7 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F helper function for osl_joinProcessWithTimeout **********************************************/ -static int is_timeout(const struct timeval* tend) +static bool is_timeout(const struct timeval* tend) { struct timeval tcurrent; gettimeofday(&tcurrent, NULL); @@ -1164,7 +1164,7 @@ static int is_timeout(const struct timeval* tend) a zombie. *********************************************/ -static int is_process_dead(pid_t pid) +static bool is_process_dead(pid_t pid) { return ((-1 == kill(pid, 0)) && (ESRCH == errno)); } @@ -1213,14 +1213,14 @@ oslProcessError SAL_CALL osl_joinProcessWithTimeout(oslProcess Process, const Ti if (pTimeout) { - int timeout = 0; + bool timeout = false; struct timeval tend; gettimeofday(&tend, NULL); tend.tv_sec += pTimeout->Seconds; - while (!is_process_dead(pid) && ((timeout = is_timeout(&tend)) == 0)) + while (!is_process_dead(pid) && !(timeout = is_timeout(&tend))) sleep(1); if (timeout) |