mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-10 14:52:05 +00:00
Investigated PVS report for svcmds and did not address type-punning code
This commit is contained in:
parent
a28f567c2c
commit
5cd2216daa
1 changed files with 4 additions and 0 deletions
|
@ -110,6 +110,7 @@ StringToFilter(char *s, ipfilter_t *f)
|
|||
s++;
|
||||
}
|
||||
|
||||
/* PVS NOTE: maybe use memcpy here? */
|
||||
f->mask = *(unsigned *)m;
|
||||
f->compare = *(unsigned *)b;
|
||||
|
||||
|
@ -150,6 +151,7 @@ SV_FilterPacket(char *from)
|
|||
i++, p++;
|
||||
}
|
||||
|
||||
/* PVS NOTE: maybe use memcpy here? */
|
||||
in = *(unsigned *)m;
|
||||
|
||||
for (i = 0; i < numipfilters; i++)
|
||||
|
@ -245,6 +247,7 @@ SVCmd_ListIP_f(void)
|
|||
|
||||
for (i = 0; i < numipfilters; i++)
|
||||
{
|
||||
/* PVS NOTE: maybe use memcpy here? */
|
||||
*(unsigned *)b = ipfilters[i].compare;
|
||||
gi.cprintf(NULL, PRINT_HIGH, "%3i.%3i.%3i.%3i\n", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
|
@ -284,6 +287,7 @@ SVCmd_WriteIP_f(void)
|
|||
|
||||
for (i = 0; i < numipfilters; i++)
|
||||
{
|
||||
/* PVS NOTE: maybe use memcpy here? */
|
||||
*(unsigned *)b = ipfilters[i].compare;
|
||||
fprintf(f, "sv addip %i.%i.%i.%i\n", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue