mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
module-rt{kit}: use spa_atoi32 instead of custom strtol
And duplicate the function into rtkit which had a similar but different approach to it. Let's get both to do the same here.
This commit is contained in:
parent
87a1e1534c
commit
696a4b22e9
2 changed files with 12 additions and 7 deletions
|
|
@ -150,10 +150,7 @@ static int get_default_int(struct pw_properties *properties, const char *name, i
|
|||
bool set_default = true;
|
||||
|
||||
if ((str = pw_properties_get(properties, name)) != NULL) {
|
||||
char *endptr;
|
||||
|
||||
val = (int)strtol(str, &endptr, 10);
|
||||
if (*endptr == '\0')
|
||||
if (spa_atoi32(str, &val, 10))
|
||||
set_default = false;
|
||||
else
|
||||
pw_log_warn("invalid integer value '%s' of property %s, using default (%d) instead", str, name, def);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue