[vlc-commits] variables: pass VLC_VAR_SETSTEP parameter by value
Rémi Denis-Courmont
git at videolan.org
Sun Jun 10 12:11:07 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 9 13:34:11 2018 +0300| [123aa0a683c404b1787ed792cfa98a16ca2e3070] | committer: Rémi Denis-Courmont
variables: pass VLC_VAR_SETSTEP parameter by value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=123aa0a683c404b1787ed792cfa98a16ca2e3070
---
modules/access/v4l2/controls.c | 2 +-
src/misc/variables.c | 2 +-
test/src/misc/variables.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/access/v4l2/controls.c b/modules/access/v4l2/controls.c
index 1133ae9858..66779edf6a 100644
--- a/modules/access/v4l2/controls.c
+++ b/modules/access/v4l2/controls.c
@@ -398,7 +398,7 @@ static vlc_v4l2_ctrl_t *ControlAddInteger (vlc_object_t *obj, int fd,
if (query->step != 1)
{
val.i_int = query->step;
- var_Change (obj, c->name, VLC_VAR_SETSTEP, &val);
+ var_Change(obj, c->name, VLC_VAR_SETSTEP, val);
}
return c;
}
diff --git a/src/misc/variables.c b/src/misc/variables.c
index b07448861e..1c4a1a4cdd 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -455,7 +455,7 @@ int (var_Change)(vlc_object_t *p_this, const char *psz_name, int i_action, ...)
break;
case VLC_VAR_SETSTEP:
assert(p_var->ops->pf_free == FreeDummy);
- p_var->step = *va_arg(ap, vlc_value_t *);
+ p_var->step = va_arg(ap, vlc_value_t);
CheckValue( p_var, &p_var->val );
break;
case VLC_VAR_GETSTEP:
diff --git a/test/src/misc/variables.c b/test/src/misc/variables.c
index 279051ac4c..8b4657ab54 100644
--- a/test/src/misc/variables.c
+++ b/test/src/misc/variables.c
@@ -306,7 +306,7 @@ static void test_limits( libvlc_int_t *p_libvlc )
assert( var_GetInteger( p_libvlc, "bla" ) == 12345 );
val.i_int = 42;
- var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val );
+ var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, val );
var_SetInteger( p_libvlc, "bla", 20 );
val.i_int = 0;
var_Change( p_libvlc, "bla", VLC_VAR_GETSTEP, &val );
@@ -360,7 +360,7 @@ static void test_change( libvlc_int_t *p_libvlc )
var_Create( p_libvlc, "bla", VLC_VAR_INTEGER );
var_Change( p_libvlc, "bla", VLC_VAR_SETMINMAX, min, max );
- var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &step );
+ var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, step );
var_SetInteger( p_libvlc, "bla", 13 );
assert( var_GetInteger( p_libvlc, "bla" ) == 13 );
@@ -413,7 +413,7 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val ) != 0 );
val.i_int = 4212;
- var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val );
+ var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, val );
assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val ) == 0
&& val.i_int == 4212 );
More information about the vlc-commits
mailing list