Re: [PATCH] scripts: unifdef: fix stringop-truncation warning
From: Tony Finch
Date: Tue Aug 21 2018 - 11:36:50 EST
Harshit Jain <harshitjain6751@xxxxxxxxx> wrote:
> /* modify this line */
> -static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
> +static void Mpass (void) { memcpy(keyword, "if ", 4); Pelif(); }
Yes, this is a good improvement, but you also need to update the comment
to match the code.
Tony.
--
f.anthony.n.finch <dot@xxxxxxxx> http://dotat.at/
Wight, Portland, Plymouth: Westerly 3 or 4, occasionally 5 in north. Slight,
occasionally moderate. Drizzle, fog banks. Moderate, occasionally very poor.