Re: [PATCH] input.c: optimize mp_cmd list.
Ingo Brückl <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
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
_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng