diff options
Diffstat (limited to 'backend/test.c')
-rw-r--r-- | backend/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/test.c b/backend/test.c index d5b7365..2ca5b3b 100644 --- a/backend/test.c +++ b/backend/test.c @@ -1355,7 +1355,7 @@ finish_pass (Test_Device * test_device) DBG (2, "finish_pass: pipe closed\n"); test_device->pipe = -1; } - if (test_device->reader_pid != -1) + if (sanei_thread_is_valid (test_device->reader_pid)) { int status; SANE_Pid pid; @@ -1364,7 +1364,7 @@ finish_pass (Test_Device * test_device) (long) test_device->reader_pid); sanei_thread_kill (test_device->reader_pid); pid = sanei_thread_waitpid (test_device->reader_pid, &status); - if (pid == -1) + if (!sanei_thread_is_valid (pid)) { DBG (1, "finish_pass: sanei_thread_waitpid failed, already terminated? (%s)\n", @@ -2568,7 +2568,7 @@ sane_start (SANE_Handle handle) test_device->reader_pid = sanei_thread_begin (reader_task, (void *) test_device); - if (test_device->reader_pid == -1) + if (!sanei_thread_is_valid (test_device->reader_pid)) { DBG (1, "sane_start: sanei_thread_begin failed (%s)\n", strerror (errno)); |