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

Ingo Brückl ib at wupperonline.de
Sun Feb 14 22:59:24 CET 2016


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.

Ingo


More information about the MPlayer-dev-eng mailing list