mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
snd_pcm_scope_set_ops: make ops parameter const
The contents of the snd_pcm_scope_ops structure are not going to be changed, so we might as well declare is as constant. This change is backwards compatible, and avoids warnings if some ops structure is actually defined as const. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
parent
79345b523e
commit
2905af225f
2 changed files with 4 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ const char *_snd_module_pcm_meter = "";
|
|||
struct _snd_pcm_scope {
|
||||
int enabled;
|
||||
char *name;
|
||||
snd_pcm_scope_ops_t *ops;
|
||||
const snd_pcm_scope_ops_t *ops;
|
||||
void *private_data;
|
||||
struct list_head list;
|
||||
};
|
||||
|
|
@ -960,7 +960,7 @@ const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope)
|
|||
* \param scope PCM meter scope
|
||||
* \param val callbacks
|
||||
*/
|
||||
void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, snd_pcm_scope_ops_t *val)
|
||||
void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, const snd_pcm_scope_ops_t *val)
|
||||
{
|
||||
scope->ops = val;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue