From 17e047e1d0f5a84f2503f1550293213a4d4a6505 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 29 Jan 2015 19:24:33 +0000 Subject: [PATCH] Use const for base32 encoding. --- src/libutil/util.c | 4 ++-- src/libutil/util.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libutil/util.c b/src/libutil/util.c index e690812d6..f62022f77 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2059,7 +2059,7 @@ rspamd_ucl_emit_gstring (ucl_object_t *obj, */ gchar * -rspamd_encode_base32 (guchar *in, gsize inlen) +rspamd_encode_base32 (const guchar *in, gsize inlen) { gint remain = -1, r, x; gsize i; @@ -2153,7 +2153,7 @@ static const guchar b32_dec[] = { }; guchar* -rspamd_decode_base32 (gchar *in, gsize inlen, gsize *outlen) +rspamd_decode_base32 (const gchar *in, gsize inlen, gsize *outlen) { guchar *res, decoded; guchar c; diff --git a/src/libutil/util.h b/src/libutil/util.h index 23964fc07..fd584938f 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -424,7 +424,7 @@ void rspamd_ucl_emit_gstring (ucl_object_t *obj, * @param inlen input length * @return freshly allocated base32 encoding of a specified string */ -gchar * rspamd_encode_base32 (guchar *in, gsize inlen); +gchar * rspamd_encode_base32 (const guchar *in, gsize inlen); /** * Decode string using base32 encoding @@ -432,6 +432,6 @@ gchar * rspamd_encode_base32 (guchar *in, gsize inlen); * @param inlen input length * @return freshly allocated base32 decoded value or NULL if input is invalid */ -guchar* rspamd_decode_base32 (gchar *in, gsize inlen, gsize *outlen); +guchar* rspamd_decode_base32 (const gchar *in, gsize inlen, gsize *outlen); #endif -- 2.39.5