libcamera: process: fix error checking
The return value of a read() call is mistakenly checked for nonzero
rather than less than zero. Fix this.
Fixes: df23ab95f3 ("libcamera: process: fix compilation on Chromium OS")
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
@@ -87,7 +87,8 @@ void sigact(int signal, siginfo_t *info, void *ucontext)
|
||||
void ProcessManager::sighandler(EventNotifier *notifier)
|
||||
{
|
||||
char data;
|
||||
if (read(pipe_[0], &data, sizeof(data))) {
|
||||
ssize_t ret = read(pipe_[0], &data, sizeof(data));
|
||||
if (ret < 0) {
|
||||
LOG(Process, Error)
|
||||
<< "Failed to read byte from signal handler pipe";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user