diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-28 14:22:52 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-28 14:22:52 +0100 |
| commit | 818a4aa2efdfa81315129b04fc24d86d02d12bca (patch) | |
| tree | ff01e920186278ad28f67c22479fba1b5ebe3a8b /coreutils | |
| parent | ae04ce82cf4352c0d0ecd993b586c10b6b8f80af (diff) | |
| download | busybox-w32-818a4aa2efdfa81315129b04fc24d86d02d12bca.tar.gz busybox-w32-818a4aa2efdfa81315129b04fc24d86d02d12bca.tar.bz2 busybox-w32-818a4aa2efdfa81315129b04fc24d86d02d12bca.zip | |
fix comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/uudecode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 10e5a55de..164b208ea 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
| @@ -279,6 +279,7 @@ int baseNUM_main(int argc UNUSED_PARAM, char **argv) | |||
| 279 | *--argv = (char*)"-"; | 279 | *--argv = (char*)"-"; |
| 280 | src_stream = xfopen_stdin(argv[0]); | 280 | src_stream = xfopen_stdin(argv[0]); |
| 281 | if (opts & 1) { | 281 | if (opts & 1) { |
| 282 | /* -d: decode */ | ||
| 282 | int flags = (unsigned char)EOF; | 283 | int flags = (unsigned char)EOF; |
| 283 | if (ENABLE_BASE32 && (!ENABLE_BASE64 || applet_name[4] == '3')) | 284 | if (ENABLE_BASE32 && (!ENABLE_BASE64 || applet_name[4] == '3')) |
| 284 | flags = ((unsigned char)EOF) | BASE64_32; | 285 | flags = ((unsigned char)EOF) | BASE64_32; |
| @@ -286,12 +287,12 @@ int baseNUM_main(int argc UNUSED_PARAM, char **argv) | |||
| 286 | } else { | 287 | } else { |
| 287 | enum { | 288 | enum { |
| 288 | SRC_BUF_SIZE = 3 * 5 * 32, /* this *MUST* be a multiple of 3 and 5 */ | 289 | SRC_BUF_SIZE = 3 * 5 * 32, /* this *MUST* be a multiple of 3 and 5 */ |
| 289 | DST_BUF_SIZE = 8 * ((SRC_BUF_SIZE + 4) / 5), /* max growth on decode (base32 case) */ | 290 | DST_BUF_SIZE = 8 * ((SRC_BUF_SIZE + 4) / 5), /* max growth on encode (base32 case) */ |
| 290 | }; | 291 | }; |
| 291 | /* Use one buffer for both input and output: | 292 | /* Use one buffer for both input and output: |
| 292 | * decoding reads input "left-to-right", | 293 | * encoding reads input "left-to-right", |
| 293 | * it's safe to place source at the end of the buffer and | 294 | * it's safe to place source at the end of the buffer and |
| 294 | * overwrite it while decoding, just be careful to have a gap. | 295 | * overwrite it while encoding, just be careful to have a gap. |
| 295 | */ | 296 | */ |
| 296 | char dst_buf[((DST_BUF_SIZE + /*gap:*/ 16) /*round up to 16:*/ | 0xf) + 1]; | 297 | char dst_buf[((DST_BUF_SIZE + /*gap:*/ 16) /*round up to 16:*/ | 0xf) + 1]; |
| 297 | #define src_buf (dst_buf + sizeof(dst_buf) - SRC_BUF_SIZE) | 298 | #define src_buf (dst_buf + sizeof(dst_buf) - SRC_BUF_SIZE) |
