summaryrefslogtreecommitdiff
path: root/base64.h
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-16 08:57:16 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-16 08:57:16 +0800
commit1ffb560b8de53c8439abed14c6669cd13a70b9ac (patch)
treed75b9f73a758853ddbc325ba876422f53029f480 /base64.h
parent97a61595470ba667df08cc83d070516e7f807d8c (diff)
Move the char * casting when facing gnutls
Diffstat (limited to 'base64.h')
-rw-r--r--base64.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/base64.h b/base64.h
index 8533af1..3c735bc 100644
--- a/base64.h
+++ b/base64.h
@@ -1,11 +1,11 @@
#include <gnutls/gnutls.h>
-static inline void base64_decode(unsigned char *host, char **decoded_host)
+static inline void base64_decode(const char *host, char **decoded_host)
{
gnutls_datum_t result;
gnutls_base64_decode2(&(gnutls_datum_t){
- host,
- strlen((const char *)host)
+ (unsigned char *)host,
+ strlen(host)
}, &result);
*decoded_host = malloc(result.size + 1);
strlcpy(*decoded_host, (const char *)result.data, result.size + 1);