mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Make all fopen() calls use O_CLOEXEC
by adding "e" to the mode strings.
This commit is contained in:
parent
400860f63c
commit
bb4f274ae0
10 changed files with 23 additions and 23 deletions
|
|
@ -256,7 +256,7 @@ static int check_device_pcm_class(const char *devname)
|
|||
/* Check device class */
|
||||
spa_scnprintf(path, sizeof(path), "/sys/class/sound/%s/pcm_class",
|
||||
devname);
|
||||
f = fopen(path, "r");
|
||||
f = fopen(path, "re");
|
||||
if (f == NULL)
|
||||
return -errno;
|
||||
sz = fread(buf, 1, sizeof(buf) - 1, f);
|
||||
|
|
@ -361,7 +361,7 @@ static int check_device_available(struct impl *this, struct device *device, int
|
|||
spa_scnprintf(path, sizeof(path), "/proc/asound/card%u/%s/%s/status",
|
||||
(unsigned int)device->id, entry->d_name, entry_pcm->d_name);
|
||||
|
||||
f = fopen(path, "r");
|
||||
f = fopen(path, "re");
|
||||
if (f == NULL)
|
||||
goto done;
|
||||
sz = fread(buf, 1, 6, f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue