commit fa18379a055ab2778081d1942489b11bd4df1ee9
Author:     Hiltjo Posthuma <[email protected]>
AuthorDate: Tue Mar 1 12:43:51 2016 +0100
Commit:     sin <[email protected]>
CommitDate: Tue Mar 1 15:24:32 2016 +0000

    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]).

diff --git a/uuencode.c b/uuencode.c
index 8b2f8df..b531720 100644
--- 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;

Reply via email to