changeset 461:65475285957d

histogram_read(): use memset() to initialize histogram data instead of for() loop.
author zas_
date Mon, 21 Apr 2008 11:44:03 +0000
parents 6d7a619e9fae
children 6a2934cd0883
files src/histogram.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/histogram.c	Mon Apr 21 10:11:55 2008 +0000
+++ b/src/histogram.c	Mon Apr 21 11:44:03 2008 +0000
@@ -115,7 +115,7 @@
 	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++)
 		{