Not needed anymore after recent refactoring.
})
#define _DEFINE_TRIVIAL_REF_FUNC(type, name, scope) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
scope type *name##_ref(type *p) { \
if (!p) \
return NULL; \
}
#define _DEFINE_TRIVIAL_UNREF_FUNC(type, name, free_func, scope) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
scope type *name##_unref(type *p) { \
if (!p) \
return NULL; \
/* For basic lookup tables with strictly enumerated entries */
#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name, type, scope) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
scope const char* name##_to_string(type i) { \
return string_table_lookup_to_string(name##_table, ELEMENTSOF(name##_table), i); \
}
}
#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING_FALLBACK(name, type, max, scope) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
scope int name##_to_string_alloc(type i, char **ret) { \
return string_table_lookup_to_string_fallback(name##_table, ELEMENTSOF(name##_table), i, max, ret); \
}
#include "macro-fundamental.h"
#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
scope const char* name##_to_string(type i) { \
assert(i >= 0 && i < (type) ELEMENTSOF(name##_table)); \
return name##_table[i]; \
}
#define DEFINE_RTNL_MESSAGE_SETTER(class, header_type, element, name, value_type) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
int sd_rtnl_message_##class##_set_##name(sd_netlink_message *m, value_type value) { \
assert_return(m, -EINVAL); \
assert_return(m->hdr, -EINVAL); \
}
#define DEFINE_RTNL_MESSAGE_PREFIXLEN_SETTER(class, header_type, family_element, element, name, value_type) \
- /* NOLINTNEXTLINE (readability-inconsistent-declaration-parameter-name) */ \
int sd_rtnl_message_##class##_set_##name(sd_netlink_message *m, value_type value) { \
assert_return(m, -EINVAL); \
assert_return(m->hdr, -EINVAL); \