mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Don't try to set default_val in volume_limit_is_changed().
We don't use the default_val anywhere, so there's no need to try to use it in a buggy and null pointer dereferencing way here. Change-Id: Ie60dbab7647056e2bf457cb5dcc5b60012ea1651
This commit is contained in:
parent
f0bec023d9
commit
72367f458e
1 changed files with 1 additions and 3 deletions
|
@ -675,10 +675,8 @@ static char* volume_limit_write_to_cfg(void* setting, char*buf, int buf_len)
|
|||
}
|
||||
static bool volume_limit_is_changed(void* setting, void* defaultval)
|
||||
{
|
||||
(void)defaultval;
|
||||
int current = *(int*)setting;
|
||||
|
||||
if ((int*)defaultval == NULL)
|
||||
*(int*)defaultval = sound_max(SOUND_VOLUME);
|
||||
return (current != sound_max(SOUND_VOLUME));
|
||||
}
|
||||
static void volume_limit_set_default(void* setting, void* defaultval)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue