diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-04-29 18:12:38 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-04-29 18:12:38 +0000 |
commit | 6069e8fadc262fdb2c0863aad4f1b159b35b1860 (patch) | |
tree | df36a6f13c033c8ba8ff85d8d8637c12cd50be35 /usr.bin/sup | |
parent | eaf908a056081e6b70a47e3f13ca0514d74475a3 (diff) |
If errmsg() is passed a negative argument return strerror(errno)
Noticed while diffing against NetBSD version
Diffstat (limited to 'usr.bin/sup')
-rw-r--r-- | usr.bin/sup/src/errmsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sup/src/errmsg.c b/usr.bin/sup/src/errmsg.c index b8de4d0836a..fff4ca0bda9 100644 --- a/usr.bin/sup/src/errmsg.c +++ b/usr.bin/sup/src/errmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errmsg.c,v 1.4 1997/09/16 11:01:15 deraadt Exp $ */ +/* $OpenBSD: errmsg.c,v 1.5 2001/04/29 18:12:37 millert Exp $ */ /* * Copyright (c) 1991 Carnegie Mellon University @@ -71,6 +71,6 @@ int cod; return(unk); #else - return strerror(cod); + return strerror(cod < 0 ? errno : cod); #endif } |