]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
base64: Trivial whitespace fixes.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 30 Apr 2015 07:06:35 +0000 (09:06 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 23 Aug 2016 14:50:50 +0000 (16:50 +0200)
base64.c

index 9188e92bca3dead3af8006f9108d5978a403fd5a..d9fa483b23b4e33983382b2f6a4142e8016d8d89 100644 (file)
--- a/base64.c
+++ b/base64.c
@@ -90,20 +90,18 @@ int base64_decode(char const *src, size_t encoded_size, char **result,
                        break;
                }
        }
-
        /*
         * We are done decoding Base-64 chars.  Let's see if we ended
         * on a byte boundary, and/or with erroneous trailing characters.
         */
-
-       if (*src == PAD64) {            /* We got a pad char. */
-               ch = *src++;            /* Skip it, get next. */
+       if (*src == PAD64) { /* We got a pad char. */
+               ch = *src++; /* Skip it, get next. */
                switch (state) {
-               case 0:         /* Invalid = in first position */
-               case 1:         /* Invalid = in second position */
+               case 0: /* Invalid = in first position */
+               case 1: /* Invalid = in second position */
                        goto fail;
 
-               case 2:         /* Valid, means one byte of info */
+               case 2: /* Valid, means one byte of info */
                        /* Skip any number of spaces. */
                        for (; ch != '\0'; ch = *src++)
                                if (!isspace(ch))
@@ -113,9 +111,8 @@ int base64_decode(char const *src, size_t encoded_size, char **result,
                                goto fail;
                        ch = *src++;            /* Skip the = */
                        /* Fall through to "single trailing =" case. */
-                       /* FALLTHROUGH */
 
-               case 3:         /* Valid, means two bytes of info */
+               case 3: /* Valid, means two bytes of info */
                        /*
                         * We know this char is an =.  Is there anything but
                         * whitespace after it?
@@ -123,7 +120,6 @@ int base64_decode(char const *src, size_t encoded_size, char **result,
                        for (; ch != '\0'; ch = *src++)
                                if (!isspace(ch))
                                        goto fail;
-
                        /*
                         * Now make sure for cases 2 and 3 that the "extra"
                         * bits that slopped past the last full byte were