From c535253d3a12b1e303fa7c9eeac9c3232ec8e1bc Mon Sep 17 00:00:00 2001 From: moononournation Date: Wed, 27 Jul 2022 21:57:10 +0800 Subject: [PATCH] fix return type --- b64.cpp | 4 ++-- b64.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/b64.cpp b/b64.cpp index b926cad..dfc43a1 100644 --- a/b64.cpp +++ b/b64.cpp @@ -18,14 +18,14 @@ void main() } */ -int b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen) +void b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen) { // Work out if we've got enough space to encode the input // Every 6 bits of input becomes a byte of output if (aOutputLen < (aInputLen*8)/6) { // FIXME Should we return an error here, or just the length - return (aInputLen*8)/6; + // return (aInputLen*8)/6; } // If we get here we've got enough space to do the encoding diff --git a/b64.h b/b64.h index cdb1226..f467b03 100644 --- a/b64.h +++ b/b64.h @@ -1,6 +1,6 @@ #ifndef b64_h #define b64_h -int b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen); +void b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen); #endif