about summary refs log tree commit diff
path: root/src/libnsss/nsss_switch_grp_getbyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnsss/nsss_switch_grp_getbyname.c')
-rw-r--r--src/libnsss/nsss_switch_grp_getbyname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnsss/nsss_switch_grp_getbyname.c b/src/libnsss/nsss_switch_grp_getbyname.c
index 086cdb1..2b7448a 100644
--- a/src/libnsss/nsss_switch_grp_getbyname.c
+++ b/src/libnsss/nsss_switch_grp_getbyname.c
@@ -19,6 +19,6 @@ int nsss_switch_grp_getbyname (nsss_switch_t *a, struct group *gr, stralloc *sa,
   if (!ipc_timed_sendv(buffer_fd(&a->b), v, 2, deadline, stamp)) return 0 ;
   if (!buffer_timed_get(&a->b, &buf[0], 1, deadline, stamp)) return 0 ;
   if ((unsigned char)buf[0] == 255) return 0 ;
-  if (buf[0]) return (errno = buf[0], 0) ;
+  if (buf[0]) return (errno = (unsigned char)buf[0], 0) ;
   return nsss_switch_grp_read(&a->b, gr, sa, ga, deadline, stamp) ;
 }