preproc: use explicit addressing while clearing smacro

Better point out explicitly that SMacro::next member
is untouched, thus do not use SMacro::next and an array.

CID 1432925

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2020-10-05 00:09:18 +03:00
parent 78f14ab1a6
commit 5e587fda09

View file

@ -979,7 +979,7 @@ static void clear_smacro(SMacro *s)
{
free_smacro_members(s);
/* Wipe everything except the next pointer */
memset(&s->next + 1, 0, sizeof *s - sizeof s->next);
memset(&s->name, 0, sizeof(*s) - offsetof(SMacro, name));
}
/*