mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-06 05:34:59 +00:00
xmltok.c: Use memcpy instead of copying single bytes (fixes #282)
Fixes cppcheck's complaint as a side-effect.
This commit is contained in:
parent
c5b3ce0932
commit
d4d8d486af
1 changed files with 1 additions and 2 deletions
|
@ -1502,8 +1502,7 @@ XmlInitUnknownEncoding(void *mem,
|
|||
{
|
||||
int i;
|
||||
struct unknown_encoding *e = (struct unknown_encoding *)mem;
|
||||
for (i = 0; i < (int)sizeof(struct normal_encoding); i++)
|
||||
((char *)mem)[i] = ((char *)&latin1_encoding)[i];
|
||||
memcpy(mem, &latin1_encoding, sizeof(struct normal_encoding));
|
||||
for (i = 0; i < 128; i++)
|
||||
if (latin1_encoding.type[i] != BT_OTHER
|
||||
&& latin1_encoding.type[i] != BT_NONXML
|
||||
|
|
Loading…
Add table
Reference in a new issue