qa: fix newlib test (CID 168329 and CID 168328)
This commit is contained in:
parent
6480cd0293
commit
ec8d3427b7
@ -3,6 +3,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
int n;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
FILE *fptr;
|
FILE *fptr;
|
||||||
|
|
||||||
@ -16,7 +17,8 @@ int main()
|
|||||||
fptr = fopen("/tmp/qa-fprint.txt", "r");
|
fptr = fopen("/tmp/qa-fprint.txt", "r");
|
||||||
if(fptr == NULL)
|
if(fptr == NULL)
|
||||||
exit(2);
|
exit(2);
|
||||||
fread (buf, 1, 64, fptr);
|
n = fread (buf, 1, 64, fptr);
|
||||||
|
buf[n] = '\0';
|
||||||
fclose(fptr);
|
fclose(fptr);
|
||||||
|
|
||||||
if(strncmp(buf, "DONE", 4) != 0){
|
if(strncmp(buf, "DONE", 4) != 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user