# HG changeset patch
# User zas_
# Date 1208644327 0
# Node ID 6802aeeed1962b2b6b89f5a7c86d457965166e42
# Parent  1b0aee2b162e3b2649a3f767a9862a23d80616d8
Use sizeof() for buffer size where appropriate.

diff -r 1b0aee2b162e -r 6802aeeed196 src/md5-util.c
--- a/src/md5-util.c	Sat Apr 19 21:50:05 2008 +0000
+++ b/src/md5-util.c	Sat Apr 19 22:32:07 2008 +0000
@@ -349,7 +349,7 @@
 
 	md5_init(&ctx);
 	
-	while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), 1024, fp)) > 0)
+	while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), sizeof(tmp_buf), fp)) > 0)
 		{
 		md5_update (&ctx, tmp_buf, nb_bytes_read);
 		}
diff -r 1b0aee2b162e -r 6802aeeed196 src/ui_fileops.c
--- a/src/ui_fileops.c	Sat Apr 19 21:50:05 2008 +0000
+++ b/src/ui_fileops.c	Sat Apr 19 22:32:07 2008 +0000
@@ -425,7 +425,7 @@
 
 	if (!fi || !fo) return FALSE;
 
-	while((b = fread(buf, sizeof(char), 4096, fi)) && b != 0)
+	while((b = fread(buf, sizeof(char), sizeof(buf), fi)) && b != 0)
 		{
 		if (fwrite(buf, sizeof(char), b, fo) != b)
 			{