summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-08-26 02:26:37 +0000
committerNeil Brown <neilb@suse.de>2005-08-26 02:26:37 +0000
commit8431b2b2861d08b517468ae0f3ce2e3502d5ea94 (patch)
treeccaff89b6c18e2fa26339fef944333ebe47b81e4 /bitmap.c
parent34355de9ca799376d1ed44142c2c5fe8471fe30c (diff)
downloadmdadm-8431b2b2861d08b517468ae0f3ce2e3502d5ea94.tar.gz
Getting ready for 2.0 release...
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitmap.c b/bitmap.c
index 36ecd95..716572c 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -152,11 +152,11 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
*/
total_bits = bitmap_bits(info->sb.sync_size, info->sb.chunksize);
- while ((n = read(fd, buf, sizeof(*buf))) > 0) {
+ while ((n = read(fd, buf, sizeof(buf))) > 0) {
unsigned long long remaining = total_bits - read_bits;
- if (remaining > sizeof(*buf) * 8) /* we want the full buffer */
- remaining = sizeof(*buf) * 8;
+ if (remaining > sizeof(buf) * 8) /* we want the full buffer */
+ remaining = sizeof(buf) * 8;
if (remaining > n * 8) /* the file is truncated */
remaining = n * 8;
dirty_bits += count_dirty_bits(buf, remaining);