diff options
| author | Neil Conway <neilc@samurai.com> | 2005-03-21 05:18:46 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2005-03-21 05:18:46 +0000 |
| commit | fa332a06ecffaa027a0b09cdd1907a03d4318911 (patch) | |
| tree | a2250749d6e07f2fdec09ee57ee0a3f406888df2 /contrib/pgcrypto/crypt-blowfish.c | |
| parent | 3cc866123224ec1cd9b2deeb4d63c39c6ef9e533 (diff) | |
| download | postgresql-fa332a06ecffaa027a0b09cdd1907a03d4318911.tar.gz | |
* construct "struct {} list [] = {}" confuses pgindent - split those.
It was a bad style to begin with, and now several loops can be clearer.
* pgcrypto.c: Fix function comments
* crypt-gensalt.c, crypt-blowfish.c: stop messing with errno
* openssl.c: use px_free instead pfree
* px.h: make redefining px_alloc/px_realloc/px_free easier
Marko Kreen
Diffstat (limited to 'contrib/pgcrypto/crypt-blowfish.c')
| -rw-r--r-- | contrib/pgcrypto/crypt-blowfish.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/contrib/pgcrypto/crypt-blowfish.c b/contrib/pgcrypto/crypt-blowfish.c index 8e41771be9..ed32da9a7f 100644 --- a/contrib/pgcrypto/crypt-blowfish.c +++ b/contrib/pgcrypto/crypt-blowfish.c @@ -35,12 +35,6 @@ #include "px.h" #include "px-crypt.h" -#define __set_errno(v) - -#ifndef __set_errno -#define __set_errno(val) errno = (val) -#endif - #ifdef __i386__ #define BF_ASM 0 /* 1 */ #define BF_SCALE 1 @@ -600,10 +594,7 @@ _crypt_blowfish_rn(const char *key, const char *setting, int i; if (size < 7 + 22 + 31 + 1) - { - __set_errno(ERANGE); return NULL; - } if (setting[0] != '$' || setting[1] != '2' || @@ -613,7 +604,6 @@ _crypt_blowfish_rn(const char *key, const char *setting, setting[5] < '0' || setting[5] > '9' || setting[6] != '$') { - __set_errno(EINVAL); return NULL; } @@ -621,7 +611,6 @@ _crypt_blowfish_rn(const char *key, const char *setting, if (count < 16 || BF_decode(data.binary.salt, &setting[7], 16)) { memset(data.binary.salt, 0, sizeof(data.binary.salt)); - __set_errno(EINVAL); return NULL; } BF_swap(data.binary.salt, 4); |
