mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -15,11 +15,6 @@
|
||||
#include "px.h"
|
||||
#include "px-crypt.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef __set_errno
|
||||
#define __set_errno(val) (errno = (val))
|
||||
#endif
|
||||
|
||||
typedef unsigned int BF_word;
|
||||
|
||||
unsigned char _crypt_itoa64[64 + 1] =
|
||||
@ -33,7 +28,6 @@ _crypt_gensalt_traditional_rn(unsigned long count,
|
||||
{
|
||||
if (output_size > 0)
|
||||
output[0] = '\0';
|
||||
__set_errno((output_size < 2 + 1) ? ERANGE : EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -57,7 +51,6 @@ _crypt_gensalt_extended_rn(unsigned long count,
|
||||
{
|
||||
if (output_size > 0)
|
||||
output[0] = '\0';
|
||||
__set_errno((output_size < 1 + 4 + 4 + 1) ? ERANGE : EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -91,7 +84,6 @@ _crypt_gensalt_md5_rn(unsigned long count,
|
||||
{
|
||||
if (output_size > 0)
|
||||
output[0] = '\0';
|
||||
__set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -173,7 +165,6 @@ _crypt_gensalt_blowfish_rn(unsigned long count,
|
||||
{
|
||||
if (output_size > 0)
|
||||
output[0] = '\0';
|
||||
__set_errno((output_size < 7 + 22 + 1) ? ERANGE : EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user