[gimp/metadata-browser] file-sunras: Use precomputed hdr_entries instead of recomputing it



commit 4cffb2467efe5613ca8faef88f19fd0b4a673d71
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Oct 6 08:49:21 2011 +0530

    file-sunras: Use precomputed hdr_entries instead of recomputing it

 plug-ins/common/file-sunras.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c
index 284e7a2..17920b2 100644
--- a/plug-ins/common/file-sunras.c
+++ b/plug-ins/common/file-sunras.c
@@ -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++));
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]