file-sunras: Use precomputed hdr_entries instead of recomputing it

This commit is contained in:
Mukund Sivaraman
2011-10-06 08:49:21 +05:30
parent 13cd1f6f80
commit 12f6dba895

View File

@ -869,7 +869,7 @@ write_sun_header (FILE *ofp,
cp = (L_CARD32 *)sunhdr;
/* Write out all 32-bit values of the header and check for byte order */
for (j = 0; j < sizeof (L_SUNFILEHEADER)/sizeof(sunhdr->l_ras_magic); j++)
for (j = 0; j < hdr_entries; j++)
{
write_card32 (ofp, *(cp++));
}