Cleanup: check return value of ioctl()
It's checked for all the other invocations... Coverity CID 207796 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b2757955f
commit
b9a398d4ab
@ -262,7 +262,11 @@ dc_serial_close (dc_iostream_t *abstract)
|
|||||||
|
|
||||||
#ifndef ENABLE_PTY
|
#ifndef ENABLE_PTY
|
||||||
// Disable exclusive access mode.
|
// Disable exclusive access mode.
|
||||||
ioctl (device->fd, TIOCNXCL, NULL);
|
if (ioctl (device->fd, TIOCNXCL, NULL)) {
|
||||||
|
int errcode = errno;
|
||||||
|
SYSERROR (abstract->context, errcode);
|
||||||
|
dc_status_set_error(&status, syserror (errcode));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Close the device.
|
// Close the device.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user