Browse Source

set errno in null cases, just in case.

OPENBSD_5_8
tedu 8 years ago
parent
commit
8cf39d5a4a
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/lib/libc/crypt/crypt.c

+ 3
- 2
src/lib/libc/crypt/crypt.c View File

@ -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 <pwd.h>
@ -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);
}

Loading…
Cancel
Save