Check return code properly in fputs (< 0 is error).

This commit is contained in:
Dr. Stephen Henson 2007-07-16 00:09:44 +00:00
parent ed31fe68ff
commit b329cc2410
4 changed files with 6 additions and 6 deletions

View file

@ -176,7 +176,7 @@ int hmac_test(const EVP_MD *md, FILE *out, FILE *in)
/* If no = or starts with [ (for [L=20] line) just copy */
if (!p)
{
if (!fputs(olinebuf, out))
if (fputs(olinebuf, out) < 0)
goto error;
continue;
}

View file

@ -120,7 +120,7 @@ int main(int argc, char **argv)
if (!rsa_test(out, in))
{
fprintf(stderr, "FATAL RSAVTEST file processing error\n");
fprintf(stderr, "FATAL RSAGTEST file processing error\n");
goto end;
}
else
@ -174,7 +174,7 @@ int rsa_test(FILE *out, FILE *in)
/* If no = or starts with [ (for [foo = bar] line) just copy */
if (!p || *keyword=='[')
{
if (!fputs(olinebuf, out))
if (fputs(olinebuf, out) < 0)
goto error;
continue;
}

View file

@ -135,7 +135,7 @@ int main(int argc, char **argv)
if (!rsa_stest(out, in, Saltlen))
{
fprintf(stderr, "FATAL RSAVTEST file processing error\n");
fprintf(stderr, "FATAL RSASTEST file processing error\n");
goto end;
}
else
@ -190,7 +190,7 @@ int rsa_stest(FILE *out, FILE *in, int Saltlen)
/* If no = just copy */
if (!p)
{
if (!fputs(olinebuf, out))
if (fputs(olinebuf, out) < 0)
goto error;
continue;
}

View file

@ -193,7 +193,7 @@ int rsa_test(FILE *out, FILE *in, int Saltlen)
/* If no = or starts with [ (for [foo = bar] line) just copy */
if (!p || *keyword=='[')
{
if (!fputs(olinebuf, out))
if (fputs(olinebuf, out) < 0)
goto error;
continue;
}