Skip to content

Commit e0e4aa1

Browse files
authored
test: fix comparison that is always false
If srcsize is an unsigned long, then the comparison (srcsize=ftell(file))<0 is always false.
1 parent e2da164 commit e0e4aa1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/tjbench.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ void dodecomptest(char *filename)
354354
{
355355
FILE *file=NULL; tjhandle handle=NULL;
356356
unsigned char **jpegbuf=NULL, *srcbuf=NULL;
357-
unsigned long *jpegsize=NULL, srcsize;
357+
unsigned long *jpegsize=NULL;
358+
long srcsize;
358359
int w=0, h=0, subsamp=-1, _w, _h, _tilew, _tileh, _subsamp;
359360
char *temp=NULL;
360361
int i, tilew, tileh, ntilesw=1, ntilesh=1, retval=0;

0 commit comments

Comments
 (0)