Commit afe7c047 authored by Niels Möller's avatar Niels Möller

Updated base16enc and base64enc example programs.

parent c314d0d2
......@@ -5,6 +5,8 @@
* sexp-transport.c (sexp_transport_iterator_first): For
base64_decode_update, omit initialization of coded_length.
* examples/base64dec.c (main): Likewise.
* examples/base16dec.c (main): Likewise, for base16_decode_update.
* base64-decode.c (base64_decode_update): Use *dst_length for
output only. Don't require callers to pass a sane value.
......
......@@ -75,8 +75,6 @@ main(int argc UNUSED, char **argv UNUSED)
return EXIT_FAILURE;
}
decoded_bytes = BASE16_DECODE_LENGTH(nbytes);
/* Decodes one chunk: */
if (!base16_decode_update(&b16_ctx, &decoded_bytes, result, nbytes, buffer))
{
......
......@@ -75,8 +75,6 @@ main(int argc UNUSED, char **argv UNUSED)
return EXIT_FAILURE;
}
decoded_bytes = BASE64_DECODE_LENGTH(nbytes);
/* Decodes one chunk: */
if (!base64_decode_update(&b64_ctx, &decoded_bytes, result, nbytes, buffer))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment