commit fa18379a055ab2778081d1942489b11bd4df1ee9
parent a51b01ff90abba93a98f6d962500fcc956bdac2e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 1 Mar 2016 12:43:51 +0100
uuencode: style: just use pointer *b
it doesn't make sense to use b[2] here anyway, and it is incorrect (should be b[3]).
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/uuencode.c b/uuencode.c
@@ -7,10 +7,9 @@
#include "util.h"
static unsigned int
-b64e(unsigned char b[2])
+b64e(unsigned char *b)
{
- unsigned int o = 0;
- unsigned int p = b[2] | (b[1] << 8) | (b[0] << 16);
+ unsigned int o, p = b[2] | (b[1] << 8) | (b[0] << 16);
const char b64et[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
o = b64et[p & 0x3f]; p >>= 6;