diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-13 15:19:32 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-13 15:19:32 +0000 |
commit | ee6e93f15a9f23ed75b53ee79a95c8faf7e9b4c7 (patch) | |
tree | ed3d0f636cb0f50e7469c41d4c94a401b7013b60 /libcrypt | |
parent | 46307c8d27b77eed67bbfabea1aa82bce11a62b5 (diff) |
des: des_setkey always returns 0, there is no point
in checking whether it returns 1.
text data bss dec hex filename
- 4283 0 70209 74492 122fc libcrypt/des.o
+ 4273 0 70209 74482 122f2 libcrypt/des.o
Diffstat (limited to 'libcrypt')
-rw-r--r-- | libcrypt/des.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libcrypt/des.c b/libcrypt/des.c index 05dd33304..502dc2819 100644 --- a/libcrypt/des.c +++ b/libcrypt/des.c @@ -372,7 +372,7 @@ setup_salt(u_int32_t salt) } -static int +static void des_setkey(const char *key) { u_int32_t k0, k1, rawkey0, rawkey1; @@ -392,7 +392,7 @@ des_setkey(const char *key) * has bad parity anyway) in order to simplify the starting * conditions. */ - return(0); + return; } old_rawkey0 = rawkey0; old_rawkey1 = rawkey1; @@ -448,7 +448,6 @@ des_setkey(const char *key) | comp_maskr[6][(t1 >> 7) & 0x7f] | comp_maskr[7][t1 & 0x7f]; } - return(0); } @@ -658,8 +657,7 @@ char *__des_crypt(const unsigned char *key, const unsigned char *setting) if (*(q - 1)) key++; } - if (des_setkey((char *)keybuf)) - return(NULL); + des_setkey((char *)keybuf); #if 0 if (*setting == _PASSWORD_EFMT1) { @@ -688,8 +686,7 @@ char *__des_crypt(const unsigned char *key, const unsigned char *setting) while (q - (u_char *)keybuf - 8 && *key) *q++ ^= *key++ << 1; - if (des_setkey((char *)keybuf)) - return(NULL); + des_setkey((char *)keybuf); } strncpy(output, setting, 9); |