about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-06-20 00:04:20 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-06-20 00:04:20 +0000
commitbcb351e66b6f5593507b3cad84ef888f49efdffc (patch)
tree56c4a807dfc31cff8da39d5937f02cb201f66e6e /src
parent3f47602084d15733edcede18e871645ec8ef5c02 (diff)
downloadutmps-bcb351e66b6f5593507b3cad84ef888f49efdffc.tar.gz
utmps-bcb351e66b6f5593507b3cad84ef888f49efdffc.tar.xz
utmps-bcb351e66b6f5593507b3cad84ef888f49efdffc.zip
Accept errno >= 128
Diffstat (limited to 'src')
-rw-r--r--src/utmps/utmps-utmpd.c4
-rw-r--r--src/utmps/utmps-wtmpd.c4
2 files changed, 4 insertions, 4 deletions
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)