summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/crypt-gensalt.c
diff options
context:
space:
mode:
authorNeil Conway2005-03-21 05:18:46 +0000
committerNeil Conway2005-03-21 05:18:46 +0000
commitfa332a06ecffaa027a0b09cdd1907a03d4318911 (patch)
treea2250749d6e07f2fdec09ee57ee0a3f406888df2 /contrib/pgcrypto/crypt-gensalt.c
parent3cc866123224ec1cd9b2deeb4d63c39c6ef9e533 (diff)
* 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-gensalt.c')
-rw-r--r--contrib/pgcrypto/crypt-gensalt.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/contrib/pgcrypto/crypt-gensalt.c b/contrib/pgcrypto/crypt-gensalt.c
index c58e794789f..8713b99a165 100644
--- a/contrib/pgcrypto/crypt-gensalt.c
+++ b/contrib/pgcrypto/crypt-gensalt.c
@@ -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;
}