aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-09-05 23:02:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-09-05 23:02:28 +0000
commit6b41d642e3a307a24aeeb606db2d8ff9df7b1f46 (patch)
tree61e24a4638296821e9c56aceb8b05170bc20bb58
parent7d4838dca87aa31487426eb9093d65058a535300 (diff)
downloadpostgresql-6b41d642e3a307a24aeeb606db2d8ff9df7b1f46.tar.gz
postgresql-6b41d642e3a307a24aeeb606db2d8ff9df7b1f46.zip
Silence compiler warnings about incompatible function pointer types.
-rw-r--r--contrib/pgcrypto/openssl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index 74234e9bf02..2ad5a63ebff 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.28 2006/07/13 04:15:25 neilc Exp $
+ * $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.29 2006/09/05 23:02:28 tgl Exp $
*/
#include "postgres.h"
@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int
#include "sha2.c"
#include "internal-sha2.c"
-typedef int (*init_f)(PX_MD *md);
+typedef void (*init_f)(PX_MD *md);
static int compat_find_digest(const char *name, PX_MD **res)
{
init_f init = NULL;
+
if (pg_strcasecmp(name, "sha224") == 0)
init = init_sha224;
else if (pg_strcasecmp(name, "sha256") == 0)
@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res)
init = init_sha512;
else
return PXE_NO_HASH;
+
*res = px_alloc(sizeof(PX_MD));
init(*res);
return 0;