1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

* 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
This commit is contained in:
Neil Conway
2005-03-21 05:18:46 +00:00
parent 3cc8661232
commit fa332a06ec
7 changed files with 75 additions and 149 deletions

View File

@ -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);