From 8cf39d5a4a652496878ca6e5d0e2346ae96486be Mon Sep 17 00:00:00 2001 From: tedu <> Date: Sat, 18 Jul 2015 00:58:19 +0000 Subject: [PATCH] set errno in null cases, just in case. --- src/lib/libc/crypt/crypt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/libc/crypt/crypt.c b/src/lib/libc/crypt/crypt.c index 76e02c23..ba32d297 100644 --- a/src/lib/libc/crypt/crypt.c +++ b/src/lib/libc/crypt/crypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypt.c,v 1.28 2015/05/13 21:01:54 bluhm Exp $ */ +/* $OpenBSD: crypt.c,v 1.29 2015/07/18 00:58:19 tedu Exp $ */ #include @@ -10,9 +10,10 @@ crypt(const char *key, const char *setting) case '2': return bcrypt(key, setting); default: + errno = EINVAL; return (NULL); } } - + errno = EINVAL; return (NULL); }