From 3b649c3076721c28289733ef126d0453db370f3c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 May 2024 13:48:57 +0200 Subject: [PATCH] cov: cleanup mask from enum to unsigned Enums are single 'values' so not a proper type for bitfields. (Probably better to use such values as defines). Although here 'daemon_talk()' is part of library API, it's hidden non-public API call - and moreover 'enum' and 'unsigned' are using the same size, so linker shouldn't have any issue with this symbol usage. For this reason there are no 'versioning' tricks applied. --- daemons/dmeventd/dmeventd.h | 2 +- daemons/dmeventd/libdevmapper-event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemons/dmeventd/dmeventd.h b/daemons/dmeventd/dmeventd.h index afe0b0c4b..661d46a0b 100644 --- a/daemons/dmeventd/dmeventd.h +++ b/daemons/dmeventd/dmeventd.h @@ -68,7 +68,7 @@ struct dm_event_fifos { int daemon_talk(struct dm_event_fifos *fifos, struct dm_event_daemon_message *msg, int cmd, const char *dso_name, const char *dev_name, - enum dm_event_mask evmask, uint32_t timeout); + unsigned evmask, uint32_t timeout); int init_fifos(struct dm_event_fifos *fifos); void fini_fifos(struct dm_event_fifos *fifos); int dm_event_get_version(struct dm_event_fifos *fifos, int *version); diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c index c47bd5acd..370d65f46 100644 --- a/daemons/dmeventd/libdevmapper-event.c +++ b/daemons/dmeventd/libdevmapper-event.c @@ -352,7 +352,7 @@ static int _daemon_write(struct dm_event_fifos *fifos, int daemon_talk(struct dm_event_fifos *fifos, struct dm_event_daemon_message *msg, int cmd, const char *dso_name, const char *dev_name, - enum dm_event_mask evmask, uint32_t timeout) + unsigned evmask, uint32_t timeout) { int msg_size; memset(msg, 0, sizeof(*msg));