From d9488baa63351cafd237f5af15018ea5898ec0bc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 2 Sep 2021 19:11:11 +0000 Subject: Pass errno as unsigned char Signed-off-by: Laurent Bercot --- src/libs6/s6_fdholder_getdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs6/s6_fdholder_getdump.c') diff --git a/src/libs6/s6_fdholder_getdump.c b/src/libs6/s6_fdholder_getdump.c index b24ed02..8c0312d 100644 --- a/src/libs6/s6_fdholder_getdump.c +++ b/src/libs6/s6_fdholder_getdump.c @@ -26,7 +26,7 @@ int s6_fdholder_getdump (s6_fdholder_t *a, genalloc *g, tain const *deadline, ta if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ; if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) return 0 ; if (!m.len || m.nfds) return (errno = EPROTO, 0) ; - if (m.s[0]) return (errno = m.s[0], 0) ; + if (m.s[0]) return (errno = (unsigned char)m.s[0], 0) ; if (m.len != 9) return (errno = EPROTO, 0) ; uint32_unpack_big(m.s + 1, &n) ; uint32_unpack_big(m.s + 5, &ntot) ; -- cgit v1.3.1