git: d4ecf62f1201 - main - libc: base64: trim some bogus trailing whitespace
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Feb 2023 06:40:02 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=d4ecf62f120183d07437d40e2cc64ef6a15787f5
commit d4ecf62f120183d07437d40e2cc64ef6a15787f5
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-02-08 06:39:25 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-02-08 06:39:25 +0000
libc: base64: trim some bogus trailing whitespace
No functional change, just a style fix.
Sponsored by: Klara, Inc.
---
lib/libc/net/base64.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/libc/net/base64.c b/lib/libc/net/base64.c
index 998c3c213834..fe70f2c71f08 100644
--- a/lib/libc/net/base64.c
+++ b/lib/libc/net/base64.c
@@ -110,9 +110,9 @@ static const char Pad64 = '=';
end of the data is performed using the '=' character.
Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
+ -------------------------------------------------
following cases can arise:
-
+
(1) the final quantum of encoding input is an integral
multiple of 24 bits; here, the final unit of encoded
output will be an integral multiple of 4 characters
@@ -154,14 +154,14 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
target[datalength++] = Base64[output[2]];
target[datalength++] = Base64[output[3]];
}
-
+
/* Now we worry about padding. */
if (0 != srclength) {
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
input[i] = *src++;
-
+
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);