summaryrefslogtreecommitdiff
path: root/coreutils/uuencode.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/uuencode.c')
-rw-r--r--coreutils/uuencode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 1d42494..49b2d91 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -83,19 +83,21 @@ static void uuencode (const char *s, const char *store, const int length, const
*p = '\0';
}
+#define SRC_BUF_SIZE 45 // This *MUST* be a multiple of 3
+#define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3)
int uuencode_main(int argc, char **argv)
{
- const int src_buf_size = 45;// This *MUST* be a multiple of 3
- const int dst_buf_size = 4 * ((src_buf_size + 2) / 3);
+ const int src_buf_size = SRC_BUF_SIZE;
+ const int dst_buf_size = DST_BUF_SIZE;
int write_size = dst_buf_size;
- RESERVE_CONFIG_BUFFER(src_buf, src_buf_size + 1);
- RESERVE_CONFIG_BUFFER(dst_buf, dst_buf_size + 1);
struct stat stat_buf;
FILE *src_stream = stdin;
char *tbl = tbl_std;
size_t size;
mode_t mode;
int opt;
+ RESERVE_CONFIG_BUFFER(src_buf, SRC_BUF_SIZE + 1);
+ RESERVE_CONFIG_BUFFER(dst_buf, DST_BUF_SIZE + 1);
while ((opt = getopt(argc, argv, "m")) != -1) {
switch (opt) {