diff options
author | tedu <> | 2015-07-18 00:58:19 +0000 |
---|---|---|
committer | tedu <> | 2015-07-18 00:58:19 +0000 |
commit | fc43134bd79a9be6f77fe4b34be019ba0505d40d (patch) | |
tree | eeb0e8c5aa288529d492fae63bdb9d4db580ac4e /src/lib/libc/crypt | |
parent | c6033fc7e7fc7a28d3ba80bf5aad8512730fa36d (diff) | |
download | openbsd-fc43134bd79a9be6f77fe4b34be019ba0505d40d.tar.gz openbsd-fc43134bd79a9be6f77fe4b34be019ba0505d40d.tar.bz2 openbsd-fc43134bd79a9be6f77fe4b34be019ba0505d40d.zip |
set errno in null cases, just in case.
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r-- | src/lib/libc/crypt/crypt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/crypt/crypt.c b/src/lib/libc/crypt/crypt.c index 76e02c235a..ba32d29752 100644 --- a/src/lib/libc/crypt/crypt.c +++ b/src/lib/libc/crypt/crypt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypt.c,v 1.28 2015/05/13 21:01:54 bluhm Exp $ */ | 1 | /* $OpenBSD: crypt.c,v 1.29 2015/07/18 00:58:19 tedu Exp $ */ |
2 | 2 | ||
3 | #include <pwd.h> | 3 | #include <pwd.h> |
4 | 4 | ||
@@ -10,9 +10,10 @@ crypt(const char *key, const char *setting) | |||
10 | case '2': | 10 | case '2': |
11 | return bcrypt(key, setting); | 11 | return bcrypt(key, setting); |
12 | default: | 12 | default: |
13 | errno = EINVAL; | ||
13 | return (NULL); | 14 | return (NULL); |
14 | } | 15 | } |
15 | } | 16 | } |
16 | 17 | errno = EINVAL; | |
17 | return (NULL); | 18 | return (NULL); |
18 | } | 19 | } |