From fc8ade72c528b21addf2459be462d0bbcd160824 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 7 Apr 2019 16:59:49 +0200 Subject: [PATCH] fixed invalid method declarations --- include/sha512.h | 4 ++-- src/sha512.c | 2 +- src/sha512_openssl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sha512.h b/include/sha512.h index 68b636d..0e5507f 100644 --- a/include/sha512.h +++ b/include/sha512.h @@ -27,12 +27,12 @@ typedef struct sha512_functions_ { } sha512_functions; extern sha512_functions _ed_sha512_functions; -void _ed_sha512_validate() { +inline void _ed_sha512_validate() { assert(_ed_sha512_functions._ed_sha512_init); assert(_ed_sha512_functions._ed_sha512_final); assert(_ed_sha512_functions._ed_sha512_update); } -int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char *out) { +inline int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char *out) { _ed_sha512_validate(); int result = 1; diff --git a/src/sha512.c b/src/sha512.c index bdcb972..36ef024 100644 --- a/src/sha512.c +++ b/src/sha512.c @@ -270,7 +270,7 @@ int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char * return 0; } -extern sha512_functions _ed_sha512_functions = { +sha512_functions _ed_sha512_functions = { _ed_sha512_init, _ed_sha512_final, _ed_sha512_update diff --git a/src/sha512_openssl.c b/src/sha512_openssl.c index a3a9712..5a1384b 100644 --- a/src/sha512_openssl.c +++ b/src/sha512_openssl.c @@ -14,7 +14,7 @@ int _ed_sha512_update(sha512_context * md, const unsigned char *in, size_t inlen return SHA512_Update(md, in, inlen) != 1; /* Returns 0 on success */ } -extern sha512_functions _ed_sha512_functions = { +sha512_functions _ed_sha512_functions = { _ed_sha512_init, _ed_sha512_final, _ed_sha512_update