[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1808211611110.3596@grey.csi.cam.ac.uk>
Date: Tue, 21 Aug 2018 16:13:10 +0100
From: Tony Finch <dot@...at.at>
To: Harshit Jain <harshitjain6751@...il.com>
cc: linux-kernel@...r.kernel.org, Tony Finch <dot@...at.at>
Subject: Re: [PATCH] scripts: unifdef: fix stringop-truncation warning
Harshit Jain <harshitjain6751@...il.com> 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@...at.at> http://dotat.at/
Wight, Portland, Plymouth: Westerly 3 or 4, occasionally 5 in north. Slight,
occasionally moderate. Drizzle, fog banks. Moderate, occasionally very poor.
Powered by blists - more mailing lists