Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b926292
)
tests: fix shadow -Wall warnings in the crcsum test program
author
Theodore Ts'o
<tytso@mit.edu>
Tue, 17 Aug 2021 22:01:39 +0000
(18:01 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 19 Aug 2021 02:39:25 +0000
(22:39 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/progs/crcsum.c
patch
|
blob
|
history
diff --git
a/tests/progs/crcsum.c
b/tests/progs/crcsum.c
index
9794e10
..
193bf0a
100644
(file)
--- a/
tests/progs/crcsum.c
+++ b/
tests/progs/crcsum.c
@@
-57,11
+57,10
@@
int main(int argc, char **argv)
while (!feof(f)) {
unsigned char buf[4096];
+ int cnt = fread(buf, 1, sizeof(buf), f);
- int c = fread(buf, 1, sizeof(buf), f);
-
- if (c)
- crc = csum_func(crc, buf, c);
+ if (cnt)
+ crc = csum_func(crc, buf, cnt);
}
printf("%u\n", crc);
return 0;