From f2da403135e2b2f641cf0f8219ad5b72083b7dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Sun, 27 Aug 2017 20:45:21 +0200 Subject: Change type of base16- and base64-encoded data from uint8_t to char. --- examples/base16dec.c | 2 +- examples/base16enc.c | 2 +- examples/base64dec.c | 2 +- examples/base64enc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/base16dec.c b/examples/base16dec.c index 70714567..1185b3e1 100644 --- a/examples/base16dec.c +++ b/examples/base16dec.c @@ -58,7 +58,7 @@ int main(int argc UNUSED, char **argv UNUSED) { /* "buffer" will hold the bytes from disk: */ - uint8_t * buffer = xalloc (CHUNK_SIZE); + char * buffer = xalloc (CHUNK_SIZE); /* "result" will hold bytes before output: */ uint8_t * result = xalloc (DECODED_SIZE); diff --git a/examples/base16enc.c b/examples/base16enc.c index 02e4f280..6ac08e1d 100644 --- a/examples/base16enc.c +++ b/examples/base16enc.c @@ -70,7 +70,7 @@ main(int argc UNUSED, char **argv UNUSED) /* "buffer" will hold the bytes from disk: */ uint8_t buffer[CHUNK_SIZE]; /* "result" will hold bytes before output: */ - uint8_t result[ENCODED_SIZE + 1]; + char result[ENCODED_SIZE + 1]; unsigned nbytes; /* Number of bytes read from stdin */ int encoded_bytes; /* Total number of bytes encoded per iteration */ diff --git a/examples/base64dec.c b/examples/base64dec.c index 624de628..d05d924a 100644 --- a/examples/base64dec.c +++ b/examples/base64dec.c @@ -58,7 +58,7 @@ int main(int argc UNUSED, char **argv UNUSED) { /* "buffer" will hold the bytes from disk: */ - uint8_t * buffer = xalloc (CHUNK_SIZE); + char * buffer = xalloc (CHUNK_SIZE); /* "result" will hold bytes before output: */ uint8_t * result = xalloc (DECODED_SIZE); diff --git a/examples/base64enc.c b/examples/base64enc.c index f8ba829b..cc6010cc 100644 --- a/examples/base64enc.c +++ b/examples/base64enc.c @@ -72,7 +72,7 @@ main(int argc UNUSED, char **argv UNUSED) /* "buffer" will hold the bytes from disk: */ uint8_t buffer[CHUNK_SIZE]; /* "result" is the result vector: */ - uint8_t result[ENCODED_SIZE + BASE64_ENCODE_FINAL_LENGTH + 1]; + char result[ENCODED_SIZE + BASE64_ENCODE_FINAL_LENGTH + 1]; unsigned nbytes; /* Number of bytes read from stdin */ int encoded_bytes; /* total number of bytes encoded per iteration */ nbytes = fread(buffer,1,CHUNK_SIZE,stdin); -- cgit v1.2.1