diff options
| author | Walter Lozano <walter.lozano@collabora.com> | 2022-10-14 09:13:00 -0300 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-05-19 15:58:13 +0000 |
| commit | 91e8c456964d5ff4b3b7afe2f1cb074de9dfe592 (patch) | |
| tree | 00878cbd2e3e9cfa290a366550159f0a7b255ce0 /dselect | |
| parent | d0ecc3286b4487d3b3f2809c95233863bffdada5 (diff) | |
Fix error handling with getline
The function getline is used to read data from different streams, however,
the error handling is not accurate.
From the man page, getline returns -1 on failure and sets errno accordingly,
but the current implementation only checks errno to see if there was a
failure. With this approach, in case getline returns success but also sets
errno it is consider and error.
Fix the issue but also checking the return value of getline.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Diffstat (limited to 'dselect')
0 files changed, 0 insertions, 0 deletions
