mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 15:28:08 +02:00
shared/helpers: fix ARRAY_COPY macro
In commit "backend-drm: simplify compile time array copy", the macro ARRAY_COPY was introduced. The macro STRING was accidentally introduced in the same commit, and as it is completely unnecessary, remove it. Also, memcpy was copying from src to dst, and it should do the opposite. So fix it. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
3193ab5807
commit
58393ca733
1 changed files with 1 additions and 3 deletions
|
|
@ -41,8 +41,6 @@ extern "C" {
|
|||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
#endif
|
||||
|
||||
#define STRING(s) #s
|
||||
|
||||
/**
|
||||
* Compile-time copy of hardcoded arrays.
|
||||
*
|
||||
|
|
@ -56,7 +54,7 @@ do { \
|
|||
"src and dst sizes must match"); \
|
||||
static_assert(sizeof(src) == sizeof(dst), \
|
||||
"src and dst sizes must match"); \
|
||||
memcpy((src), (dst), sizeof(src)); \
|
||||
memcpy((dst), (src), sizeof(src)); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue