OSDN Git Service
(root)
/
lha
/
lha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fbbb40d
)
cannot operate ++ for void pointer
author
Koji Arai
<jca02266@gmail.com>
Thu, 30 Oct 2008 06:05:05 +0000
(15:05 +0900)
committer
Koji Arai
<jca02266@gmail.com>
Thu, 30 Oct 2008 13:27:16 +0000
(22:27 +0900)
src/header.c
patch
|
blob
|
history
diff --git
a/src/header.c
b/src/header.c
index
5b710b9
..
33fb52e
100644
(file)
--- a/
src/header.c
+++ b/
src/header.c
@@
-61,8
+61,9
@@
calc_sum(p, len)
int len;
{
int sum = 0;
int len;
{
int sum = 0;
+ unsigned char *pc = (unsigned char*)p;
- while (len--) sum += *
(unsigned char*)p
++;
+ while (len--) sum += *
pc
++;
return sum & 0xff;
}
return sum & 0xff;
}