diff --git a/src/dalist_debug.c b/src/dalist_debug.c index 4461286..92cc5b1 100644 --- a/src/dalist_debug.c +++ b/src/dalist_debug.c @@ -91,8 +91,12 @@ static int dalist_dbg_write_posix( bytes_written = pfn_write(fildes,buf,nbyte); - if (bytes_written == nbyte) + if (bytes_written < 0) + return DALIST_EDEBUGENV; + + else if (bytes_written == (ssize_t)nbyte) return DALIST_OK; + else return DALIST_EDEBUGENV; }