diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-10-06 13:15:28 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-10-06 13:15:28 +0200 |
commit | 5f45b7d53361bd32ce390e12f814660a98f86aa9 (patch) | |
tree | 53612a69e99fcb3c30392e9b682da3b0ff844f3e /mmime.c | |
parent | ce9ac3aff4bd2fe58132c3ec194269abe4fda4a7 (diff) | |
download | mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.gz mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.xz mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.zip |
use appropriate integer types
Mainly found with clang -Wconversion -Wshorten-64-to-32.
Diffstat (limited to 'mmime.c')
-rw-r--r-- | mmime.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mmime.c b/mmime.c index e8426d1..1f16d5a 100644 --- a/mmime.c +++ b/mmime.c @@ -57,7 +57,8 @@ int gen_b64(uint8_t *s, off_t size) return 0; } -int gen_qp(uint8_t *s, off_t size, int maxlinelen, int linelen) +size_t +gen_qp(uint8_t *s, off_t size, size_t maxlinelen, size_t linelen) { off_t i; int header = linelen > 0; @@ -298,7 +299,7 @@ print_header(char *line) { int prevq = 0; // was the previous word encoded as qp? - int linelen = s - line; + size_t linelen = s - line; while (*s) { size_t highbit = 0; @@ -365,7 +366,7 @@ gen_build() int intext = 0; while (1) { - int read = getdelim(&line, &linelen, '\n', stdin); + ssize_t read = getdelim(&line, &linelen, '\n', stdin); if (read == -1) { if (feof(stdin)) break; |