Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms
From: Joe Perches
Date: Wed Jul 24 2019 - 03:11:05 EST
On Wed, 2019-07-24 at 08:53 +0200, Rasmus Villemoes wrote:
> BUILD_BUG_ON(!__same_type())
> strscpy(dst, src, ARRAY_SIZE(dst))
Doing this without the temporary is less legible to read
the compiler error when someone improperly does:
char *foo;
char *bar;
stracpy(foo, bar);