Commit 8096f520 authored by Josh de Kock's avatar Josh de Kock Committed by James Almer

fate/api-h264-slice-test: don't use ssize_t

Fixes ticket #7521
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 66425add
...@@ -180,15 +180,12 @@ int main(int argc, char **argv) ...@@ -180,15 +180,12 @@ int main(int argc, char **argv)
while(1) { while(1) {
uint16_t size = 0; uint16_t size = 0;
ssize_t ret = fread(&size, 1, sizeof(uint16_t), fd); size_t ret = fread(&size, 1, sizeof(uint16_t), fd);
if (ret < 0) { if (ret != sizeof(uint16_t))
perror("Couldn't read size");
exit(1);
} else if (ret != sizeof(uint16_t))
break; break;
size = ntohs(size); size = ntohs(size);
ret = fread(p, 1, size, fd); ret = fread(p, 1, size, fd);
if (ret < 0 || ret != size) { if (ret != size) {
perror("Couldn't read data"); perror("Couldn't read data");
exit(1); exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment