diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-02-07 10:05:15 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-02-07 10:05:15 +0000 |
commit | 57085513d0512aa8b4cc6b636cefcfa422003418 (patch) | |
tree | dfb1521d280a915a610e8af2631a56dd0e6141ee | |
parent | 637d71df931a2627493618b5f73eab88d18132b8 (diff) | |
download | pamela-57085513d0512aa8b4cc6b636cefcfa422003418.tar.gz pamela-57085513d0512aa8b4cc6b636cefcfa422003418.tar.xz pamela-57085513d0512aa8b4cc6b636cefcfa422003418.zip |
Enforce nonzero return code even if errno is 0
-rw-r--r-- | src/pamela/pamelad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pamela/pamelad.c b/src/pamela/pamelad.c index 0a55f66..f515841 100644 --- a/src/pamela/pamelad.c +++ b/src/pamela/pamelad.c @@ -140,6 +140,7 @@ static void do_strerror (int num) if (!x) { char c = errno ; + if (!c) c = EIO ; put(&c, 1) ; } else @@ -159,6 +160,7 @@ static void do_getenvlist (void) if (!envp) { char c = errno ; + if (!c) c = EIO ; put(&c, 1) ; } else |