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:
Wim Taymans 2021-02-02 12:09:29 +01:00
parent 41063578a5
commit 2b44f42845
13 changed files with 27 additions and 27 deletions

View file

@ -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);