Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
(uint8_t *)(item) < (uint8_t *)(head) + (head)->size; \
item = KDBUS_ITEM_NEXT(item))
+enum {
+ CHECK_OK,
+ CHECK_SKIP,
+ CHECK_ERR,
+};
+
+#define ASSERT_RETURN(cond) \
+ if (!(cond)) { \
+ fprintf(stderr, "Assertion '%s' failed in %s(), line %d\n", #cond, __func__, __LINE__); \
+ return CHECK_ERR; \
+ }
+
/* Dump as user of process, useful for user namespace testing */
#define SUID_DUMP_USER 1
#include "kdbus-util.h"
#include "kdbus-enum.h"
-enum {
- CHECK_OK,
- CHECK_SKIP,
- CHECK_ERR,
-};
-
enum {
CHECK_CREATE_BUS = 1 << 0,
CHECK_CREATE_CONN = 1 << 1,
KDBUS_ATTACH_SECLABEL | \
KDBUS_ATTACH_AUDIT
-#define ASSERT_RETURN(cond) \
- if (!(cond)) { \
- fprintf(stderr, "Assertion '%s' failed in %s(), line %d\n", #cond, __func__, __LINE__); \
- return CHECK_ERR; \
- }
-
static struct kdbus_conn *make_conn(const char *buspath, uint64_t flags)
{
int ret;