mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: alsa,v4l2: use proper enum for action
An enum provides better debugging experience and makes the source code easier to grasp.
This commit is contained in:
parent
04b8a0c215
commit
5fa34988fa
2 changed files with 12 additions and 8 deletions
|
|
@ -28,9 +28,11 @@
|
|||
|
||||
#define MAX_DEVICES 64
|
||||
|
||||
#define ACTION_ADD 0
|
||||
#define ACTION_REMOVE 1
|
||||
#define ACTION_DISABLE 2
|
||||
enum action {
|
||||
ACTION_ADD,
|
||||
ACTION_REMOVE,
|
||||
ACTION_DISABLE,
|
||||
};
|
||||
|
||||
struct device {
|
||||
uint32_t id;
|
||||
|
|
@ -357,7 +359,7 @@ static bool check_access(struct impl *this, struct device *device)
|
|||
return device->accessible;
|
||||
}
|
||||
|
||||
static void process_device(struct impl *this, uint32_t action, struct udev_device *dev)
|
||||
static void process_device(struct impl *this, enum action action, struct udev_device *dev)
|
||||
{
|
||||
uint32_t id;
|
||||
struct device *device;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue