diff base64.c @ 657:50112fafa1ef libavutil

Cosmetics: prefer out/in over buf/src for the parameter names of av_base64_encode(), for consistency/readability reasons.
author stefano
date Sun, 08 Feb 2009 21:13:11 +0000
parents eadb97de8dc0
children cc7c1ea68a52
line wrap: on
line diff
--- a/base64.c	Sun Feb 08 21:08:42 2009 +0000
+++ b/base64.c	Sun Feb 08 21:13:11 2009 +0000
@@ -69,7 +69,7 @@
 * Fixed edge cases and made it work from data (vs. strings) by Ryan.
 *****************************************************************************/
 
-char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size)
+char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size)
 {
     static const char b64[] =
         "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -79,11 +79,11 @@
     int bytes_remaining = size;
 
     if (size >= UINT_MAX / 4 ||
-        buf_size < (size+2) / 3 * 4 + 1)
+        out_size < (size+2) / 3 * 4 + 1)
         return NULL;
-    ret = dst = buf;
+    ret = dst = out;
     while (bytes_remaining) {
-        i_bits = (i_bits << 8) + *src++;
+        i_bits = (i_bits << 8) + *in++;
         bytes_remaining--;
         i_shift += 8;