aboutsummaryrefslogtreecommitdiffstats
path: root/algorithm_output_size.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 14:05:03 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 14:05:03 +0200
commitc799f8fcf1210079a5f00fa944d8e8c59a37fc60 (patch)
treee0056c8e10c2e29be0c42e0a2187e9b2405f444a /algorithm_output_size.c
parentUse malloc by default but allow bounded alloca (diff)
downloadlibsha1-c799f8fcf1210079a5f00fa944d8e8c59a37fc60.tar.gz
libsha1-c799f8fcf1210079a5f00fa944d8e8c59a37fc60.tar.bz2
libsha1-c799f8fcf1210079a5f00fa944d8e8c59a37fc60.tar.xz
Inline some output size functions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'algorithm_output_size.c')
-rw-r--r--algorithm_output_size.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/algorithm_output_size.c b/algorithm_output_size.c
index ffba6d8..c91c23d 100644
--- a/algorithm_output_size.c
+++ b/algorithm_output_size.c
@@ -8,14 +8,4 @@
* @param algorithm The hashing algorithm
* @return The number of bytes in the output, zero on error
*/
-size_t
-libsha1_algorithm_output_size(enum libsha1_algorithm algorithm)
-{
- switch (algorithm) {
- case LIBSHA1_0: return 20;
- case LIBSHA1_1: return 20;
- default:
- errno = EINVAL;
- return 0;
- }
-}
+extern inline size_t libsha1_algorithm_output_size(enum libsha1_algorithm);