summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-10-22 09:51:54 +0000
committertb <>2021-10-22 09:51:54 +0000
commitf7ccc1b14a02baed54e9b735b084d0ccac1eb9ce (patch)
treee27544f738575ed2de36e7bf2d6554e04de11044 /src
parent2246d2d17f5febb876e6804b237bd0696425ebe4 (diff)
downloadopenbsd-f7ccc1b14a02baed54e9b735b084d0ccac1eb9ce.tar.gz
openbsd-f7ccc1b14a02baed54e9b735b084d0ccac1eb9ce.tar.bz2
openbsd-f7ccc1b14a02baed54e9b735b084d0ccac1eb9ce.zip
Fix some ghastly whitespace. From Martin Vahlensieck
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/net/base64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libc/net/base64.c b/src/lib/libc/net/base64.c
index 5f4003d7c1..7bfcb214d9 100644
--- a/src/lib/libc/net/base64.c
+++ b/src/lib/libc/net/base64.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: base64.c,v 1.10 2021/10/22 09:49:26 tb Exp $ */ 1/* $OpenBSD: base64.c,v 1.11 2021/10/22 09:51:54 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 by Internet Software Consortium. 4 * Copyright (c) 1996 by Internet Software Consortium.
@@ -103,9 +103,9 @@ static const char Pad64 = '=';
103 end of the data is performed using the '=' character. 103 end of the data is performed using the '=' character.
104 104
105 Since all base64 input is an integral number of octets, only the 105 Since all base64 input is an integral number of octets, only the
106 ------------------------------------------------- 106 -------------------------------------------------
107 following cases can arise: 107 following cases can arise:
108 108
109 (1) the final quantum of encoding input is an integral 109 (1) the final quantum of encoding input is an integral
110 multiple of 24 bits; here, the final unit of encoded 110 multiple of 24 bits; here, the final unit of encoded
111 output will be an integral multiple of 4 characters 111 output will be an integral multiple of 4 characters
@@ -148,14 +148,14 @@ b64_ntop(src, srclength, target, targsize)
148 target[datalength++] = Base64[output[2]]; 148 target[datalength++] = Base64[output[2]];
149 target[datalength++] = Base64[output[3]]; 149 target[datalength++] = Base64[output[3]];
150 } 150 }
151 151
152 /* Now we worry about padding. */ 152 /* Now we worry about padding. */
153 if (0 != srclength) { 153 if (0 != srclength) {
154 /* Get what's left. */ 154 /* Get what's left. */
155 input[0] = input[1] = input[2] = '\0'; 155 input[0] = input[1] = input[2] = '\0';
156 for (i = 0; i < srclength; i++) 156 for (i = 0; i < srclength; i++)
157 input[i] = *src++; 157 input[i] = *src++;
158 158
159 output[0] = input[0] >> 2; 159 output[0] = input[0] >> 2;
160 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); 160 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
161 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); 161 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
@@ -203,7 +203,7 @@ b64_pton(src, target, targsize)
203 break; 203 break;
204 204
205 pos = strchr(Base64, ch); 205 pos = strchr(Base64, ch);
206 if (pos == 0) /* A non-base64 character. */ 206 if (pos == 0) /* A non-base64 character. */
207 return (-1); 207 return (-1);
208 208
209 switch (state) { 209 switch (state) {