Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] input.c: optimize mp_cmd list.

Reimar Döffinger wrote on Sun, 14 Feb 2016 13:47:59 +0100:

>> That said, I was rather thinking of something like below,
>> if that looks good to you (it could also check for NULL termination
>> or alternatively use memcpy, I haven't thought that through):

> #define ARRAY_STRCPY(d, s) do { \
>     _Static_assert(sizeof(d) >= sizeof(s), "Destination array too small!"); \
> [...]

A check at compile time would be best, of course.

MPlayer-dev-eng mailing list