Fix kmod_*stat_inc() after r249276. The incorrect code actually

increased the pointer, not the memory it points to.

In collaboration with:	kib
Reported & tested by:	Ian FREISLICH <ianf clue.co.za>
Sponsored by:		Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2013-06-21 06:36:26 +00:00
parent 036beed93a
commit 42a253e6a1
2 changed files with 3 additions and 3 deletions

View File

@ -283,14 +283,14 @@ void
kmod_ipstat_inc(int statnum)
{
counter_u64_add((counter_u64_t )&V_ipstatp + statnum, 1);
counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), 1);
}
void
kmod_ipstat_dec(int statnum)
{
counter_u64_add((counter_u64_t )&V_ipstatp + statnum, -1);
counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), -1);
}
static int

View File

@ -309,7 +309,7 @@ void
kmod_tcpstat_inc(int statnum)
{
counter_u64_add((counter_u64_t )&V_tcpstatp + statnum, 1);
counter_u64_add(*((counter_u64_t *)&V_tcpstatp + statnum), 1);
}
/*