qa: fix newlib test (CID 168329 and CID 168328)

This commit is contained in:
Giacomo Tesio 2017-05-04 00:04:23 +02:00
parent 6480cd0293
commit ec8d3427b7
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include <string.h>
int main()
{
int n;
char buf[64];
FILE *fptr;
@ -16,7 +17,8 @@ int main()
fptr = fopen("/tmp/qa-fprint.txt", "r");
if(fptr == NULL)
exit(2);
fread (buf, 1, 64, fptr);
n = fread (buf, 1, 64, fptr);
buf[n] = '\0';
fclose(fptr);
if(strncmp(buf, "DONE", 4) != 0){