mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pass the complete buffer size to snprintf
There is no reason to pass size-1, snprintf will always put a \0 at the end.
This commit is contained in:
parent
41063578a5
commit
2b44f42845
13 changed files with 27 additions and 27 deletions
|
|
@ -323,7 +323,7 @@ static bool check_access(struct impl *this, struct device *device)
|
|||
{
|
||||
char path[128];
|
||||
|
||||
snprintf(path, sizeof(path)-1, "/dev/video%u", device->id);
|
||||
snprintf(path, sizeof(path), "/dev/video%u", device->id);
|
||||
device->accessible = access(path, R_OK|W_OK) >= 0;
|
||||
spa_log_debug(this->log, "%s accessible:%u", path, device->accessible);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue