summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-13 23:38:20 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-13 23:38:20 +0000
commit46e55aaabc33549b91a85052aa048dffaf061761 (patch)
tree3a3337b6dfcd002a05f049487dc8c83a48e7d7fa /openbsd-compat
parent4870afd7c73a605778794378915eab0c26e8c353 (diff)
- Fix strerror() in bsd-misc.c
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index c0d2d65e..6f92e064 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -26,7 +26,7 @@
#include "xmalloc.h"
#include "ssh.h"
-RCSID("$Id: bsd-misc.c,v 1.2 2001/02/09 01:55:36 djm Exp $");
+RCSID("$Id: bsd-misc.c,v 1.3 2001/03/13 23:38:20 mouring Exp $");
char *get_progname(char *argv0)
{
@@ -76,10 +76,10 @@ const char *strerror(int e)
extern int sys_nerr;
extern char *sys_errlist[];
- if ((e >= 0) || (e < sys_nerr))
- return("unlisted error");
- else
+ if ((e >= 0) && (e < sys_nerr))
return(sys_errlist[e]);
+ else
+ return("unlisted error");
}
#endif