summaryrefslogtreecommitdiffhomepage
path: root/src/fmt_fp.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-08-19 15:51:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-08-19 15:51:08 +0900
commit8cea1f890758da901916ba331bf4b524e4e54e00 (patch)
treeb8e51db1a8037eb14d818b0a370fde41adfa4f93 /src/fmt_fp.c
parenta117ec771b79819f42760c00e47a3616d5e67deb (diff)
downloadmruby-8cea1f890758da901916ba331bf4b524e4e54e00.tar.gz
mruby-8cea1f890758da901916ba331bf4b524e4e54e00.zip
Use `ptrdiff_t` instead of `int`.
Diffstat (limited to 'src/fmt_fp.c')
-rw-r--r--src/fmt_fp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmt_fp.c b/src/fmt_fp.c
index c1c2ad703..803343233 100644
--- a/src/fmt_fp.c
+++ b/src/fmt_fp.c
@@ -61,7 +61,7 @@ out(struct fmt_args *f, const char *s, size_t l)
#define PAD_SIZE 256
static void
-pad(struct fmt_args *f, char c, int w, int l, uint8_t fl)
+pad(struct fmt_args *f, char c, int w, ptrdiff_t l, uint8_t fl)
{
char pad[PAD_SIZE];
if (fl & (LEFT_ADJ | ZERO_PAD) || l >= w) return;
@@ -101,7 +101,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, uint8_t fl, int t)
ptrdiff_t l;
char buf[9+LDBL_MANT_DIG/4], *s;
const char *prefix="-0X+0X 0X-0x+0x 0x";
- int pl;
+ ptrdiff_t pl;
char ebuf0[3*sizeof(int)], *ebuf=&ebuf0[3*sizeof(int)], *estr;
pl=1;