On Wed, Jul 26, 2023 at 12:42:00PM +0200, Jan Beulich wrote:
> While what "tmp" points to has been cleared at the end of the first
> iteration of parseNetDevLine()'s main loop, this is too late for the
> first iteration's invocation of strpbrk() (copying the interface name).
> Properly nul-terminate the string at population time instead, removing
> the late clearing.
> 
> While there also eliminate a confusing (because of being wrong) comment:
> A regex parsing error would be handled one further scope outwards. Here
> we're dealing with field 1 vs any of the later fields.

I think the author of the comment meant that they couldn't create a
regex that locate the interface name, and instead used strpbrk(). But if
the comment is confusing, it's not helpful.

> Signed-off-by: Jan Beulich <jbeul...@suse.com>

Acked-by: Anthony PERARD <anthony.per...@citrix.com>

Thanks,

-- 
Anthony PERARD

Reply via email to