aboutsummaryrefslogtreecommitdiff
path: root/coreutils/uuencode.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-31 14:25:52 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-31 14:25:52 +0000
commit87be316149604ca18613acb1a776ea4ea9f07929 (patch)
tree8448102664334cc678591c09cb847529e36b0cc4 /coreutils/uuencode.c
parent4333a09d657348672db61f3063f2d272708c2548 (diff)
downloadbusybox-87be316149604ca18613acb1a776ea4ea9f07929.tar.gz
more better for me signed<->unsigned and the const keyword usage
Diffstat (limited to 'coreutils/uuencode.c')
-rw-r--r--coreutils/uuencode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index ee07b084f..d45565c6e 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -58,10 +58,10 @@ static const char tbl_std[65] = {
* buffer of at least 1+BASE64_LENGTH(length) bytes.
* where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3))
*/
-static void uuencode (const unsigned char *s, const char *store, const int length, const char *tbl)
+static void uuencode (const unsigned char *s, char *store, const int length, const char *tbl)
{
int i;
- unsigned char *p = (unsigned char *)store;
+ char *p = store;
/* Transform the 3x8 bits to 4x6 bits, as required by base64. */
for (i = 0; i < length; i += 3) {
@@ -86,9 +86,9 @@ static void uuencode (const unsigned char *s, const char *store, const int lengt
#define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3)
int uuencode_main(int argc, char **argv)
{
- const int src_buf_size = SRC_BUF_SIZE;
- const int dst_buf_size = DST_BUF_SIZE;
- int write_size = dst_buf_size;
+ const size_t src_buf_size = SRC_BUF_SIZE;
+ const size_t dst_buf_size = DST_BUF_SIZE;
+ size_t write_size = dst_buf_size;
struct stat stat_buf;
FILE *src_stream = stdin;
const char *tbl;