From 595af7cbcb603de5f69d540a410a2b7107050df5 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 18 Jul 2015 00:58:20 +0000 Subject: set errno in null cases, just in case. --- lib/libc/crypt/crypt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/crypt/crypt.c b/lib/libc/crypt/crypt.c index 76e02c235aa..ba32d297527 100644 --- a/lib/libc/crypt/crypt.c +++ b/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); } -- cgit v1.2.3