skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit e79cd0580433ed92ed4f827e097323f066d636d8
parent 8c4e1cb0b1ee824571d28f0f4e9e5250b18cc174
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Thu,  2 Sep 2021 15:21:11 +0000

 Make textclient_command work with errno > 127

Signed-off-by: Laurent Bercot <ska@appnovation.com>

Diffstat:
Msrc/libunixonacid/textclient_command.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libunixonacid/textclient_command.c b/src/libunixonacid/textclient_command.c @@ -11,6 +11,6 @@ int textclient_command (textclient *a, char const *s, size_t len, tain const *de struct iovec ans ; if (!textclient_exchange(a, s, len, &ans, deadline, stamp)) return 0 ; if (ans.iov_len != 1) return (errno = EPROTO, 0) ; - if (*(char *)ans.iov_base) return (errno = *(char *)ans.iov_base, 0) ; + if (*(unsigned char *)ans.iov_base) return (errno = *(unsigned char *)ans.iov_base, 0) ; return 1 ; }