From bcb351e66b6f5593507b3cad84ef888f49efdffc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 20 Jun 2018 00:04:20 +0000 Subject: Accept errno >= 128 --- src/utmps/utmps-utmpd.c | 4 ++-- src/utmps/utmps-wtmpd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/utmps/utmps-utmpd.c b/src/utmps/utmps-utmpd.c index 42fb4ed..b098b79 100644 --- a/src/utmps/utmps-utmpd.c +++ b/src/utmps/utmps-utmpd.c @@ -39,8 +39,8 @@ static void flush1 (void) static void answer (int e) { - char c = e ; - buffer_putnoflush(buffer_1small, &c, 1) ; + unsigned char c = e ; + buffer_putnoflush(buffer_1small, (char *)&c, 1) ; flush1() ; } diff --git a/src/utmps/utmps-wtmpd.c b/src/utmps/utmps-wtmpd.c index b8ff5c3..3571658 100644 --- a/src/utmps/utmps-wtmpd.c +++ b/src/utmps/utmps-wtmpd.c @@ -19,8 +19,8 @@ static void answer (int e) { - char c = e ; - write(1, &c, 1) ; + unsigned char c = e ; + write(1, (char *)&c, 1) ; } int main (void) -- cgit 1.4.1