histogram_read(): use memset() to initialize histogram data instead of for() loop.
authorLaurent Monin <geeqie@norz.org>
Mon, 21 Apr 2008 11:44:03 +0000 (11:44 +0000)
committerLaurent Monin <geeqie@norz.org>
Mon, 21 Apr 2008 11:44:03 +0000 (11:44 +0000)
src/histogram.c

index a79c983..e9b18ee 100644 (file)
@@ -115,7 +115,7 @@ gulong histogram_read(Histogram *histogram, GdkPixbuf *imgpixbuf)
        s_pix = gdk_pixbuf_get_pixels(imgpixbuf);
        has_alpha = gdk_pixbuf_get_has_alpha(imgpixbuf);
 
-       for (i = 0; i < HISTOGRAM_SIZE*4; i++) histogram->histmap[i] = 0;
+       memset(histogram->histmap, 0, sizeof(histogram->histmap));
 
        for (i = 0; i < h; i++)
                {