aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/avsscanf.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-11-19 15:16:36 +0100
committerPaul B Mahol <onemda@gmail.com>2018-11-19 15:16:36 +0100
commit277fd9c2ac729af8ae2e68666aeb5838639bd49a (patch)
tree63cb23d7f0a3b523548a78aed35186c199562b20 /libavutil/avsscanf.c
parent6da439219d2334a2eac27e49fe8584daab6a2c00 (diff)
downloadffmpeg-277fd9c2ac729af8ae2e68666aeb5838639bd49a.tar.gz
avutil/avsscanf: use ptrdiff_t instead of off_t
Diffstat (limited to 'libavutil/avsscanf.c')
-rw-r--r--libavutil/avsscanf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/avsscanf.c b/libavutil/avsscanf.c
index 9b3685f34b..8fc9c5956b 100644
--- a/libavutil/avsscanf.c
+++ b/libavutil/avsscanf.c
@@ -39,7 +39,7 @@ typedef struct FFFILE {
unsigned char *buf;
unsigned char *rpos, *rend;
unsigned char *shend;
- off_t shlim, shcnt;
+ ptrdiff_t shlim, shcnt;
void *cookie;
size_t (*read)(struct FFFILE *, unsigned char *, size_t);
} FFFILE;
@@ -82,7 +82,7 @@ static int ffuflow(FFFILE *f)
return EOF;
}
-static void ffshlim(FFFILE *f, off_t lim)
+static void ffshlim(FFFILE *f, ptrdiff_t lim)
{
f->shlim = lim;
f->shcnt = f->buf - f->rpos;
@@ -96,7 +96,7 @@ static void ffshlim(FFFILE *f, off_t lim)
static int ffshgetc(FFFILE *f)
{
int c;
- off_t cnt = shcnt(f);
+ ptrdiff_t cnt = shcnt(f);
if (f->shlim && cnt >= f->shlim || (c=ffuflow(f)) < 0) {
f->shcnt = f->buf - f->rpos + cnt;
f->shend = 0;
@@ -739,7 +739,7 @@ static int ff_vfscanf(FFFILE *f, const char *fmt, va_list ap)
int matches=0;
unsigned long long x;
double y;
- off_t pos = 0;
+ ptrdiff_t pos = 0;
unsigned char scanset[257];
size_t i;