base64: Reformat bin_to_base64()

Fixes T188

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit b5160ce9e0)
This commit is contained in:
Andreas Schneider
2019-10-31 16:30:17 +01:00
parent c98d024b9a
commit a011f853ed

View File

@@ -270,7 +270,8 @@ static void _bin_to_base64(uint8_t *dest,
* *
* @returns the converted string * @returns the converted string
*/ */
unsigned char *bin_to_base64(const unsigned char *source, int len) { unsigned char *bin_to_base64(const unsigned char *source, int len)
{
unsigned char *base64; unsigned char *base64;
unsigned char *ptr; unsigned char *ptr;
int flen = len + (3 - (len % 3)); /* round to upper 3 multiple */ int flen = len + (3 - (len % 3)); /* round to upper 3 multiple */