mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 08:52:48 +00:00
macro: add STRLITERALLEN() and STRARRAYLEN()
sizeof() implementation for string literals and string arrays that makes it behave like strlen() for strings. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
b857f4be4f
commit
36dee4a2b6
@ -348,4 +348,7 @@ extern int __build_bug_on_failed;
|
||||
#define LXC_INVALID_UID ((uid_t)-1)
|
||||
#define LXC_INVALID_GID ((gid_t)-1)
|
||||
|
||||
#define STRLITERALLEN(x) (sizeof(""x"") - 1)
|
||||
#define STRARRAYLEN(x) (sizeof(x) - 1)
|
||||
|
||||
#endif /* __LXC_MACRO_H */
|
||||
|
Loading…
Reference in New Issue
Block a user