fate/api-h264-slice-test: don't use ssize_t
Fixes ticket #7521 Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 8096f52049acb1861645815a54435b9fd2d5e77a)
This commit is contained in:
parent
1665ac6a44
commit
5060a615c7
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user