Mercurial > geeqie
changeset 435:6802aeeed196
Use sizeof() for buffer size where appropriate.
author | zas_ |
---|---|
date | Sat, 19 Apr 2008 22:32:07 +0000 |
parents | 1b0aee2b162e |
children | f0289d80ecc1 |
files | src/md5-util.c src/ui_fileops.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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) {