[vlc-commits] variables: remove useless VLC_VAR_SETVALUE parameter
Rémi Denis-Courmont
git at videolan.org
Sun Jun 10 12:11:00 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 9 13:07:17 2018 +0300| [11717e54d2626319289e0b5a94f30c2d6ac10688] | committer: Rémi Denis-Courmont
variables: remove useless VLC_VAR_SETVALUE parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=11717e54d2626319289e0b5a94f30c2d6ac10688
---
modules/access/v4l2/controls.c | 14 +++++++-------
modules/gui/skins2/src/theme_repository.cpp | 2 +-
src/audio_output/output.c | 2 +-
src/input/event.c | 30 ++++++++++++++---------------
src/input/input.c | 4 ++--
src/input/var.c | 24 +++++++++++------------
src/video_output/interlacing.c | 4 ++--
7 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/modules/access/v4l2/controls.c b/modules/access/v4l2/controls.c
index 2df8ec32fe..ae041b1923 100644
--- a/modules/access/v4l2/controls.c
+++ b/modules/access/v4l2/controls.c
@@ -390,7 +390,7 @@ static vlc_v4l2_ctrl_t *ControlAddInteger (vlc_object_t *obj, int fd,
msg_Dbg (obj, " current: %3"PRId32", default: %3"PRId32,
ctrl.value, query->default_value);
val.i_int = ctrl.value;
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
var_Change (obj, c->name, VLC_VAR_SETMINMAX,
&(vlc_value_t){ .i_int = query->minimum },
@@ -429,7 +429,7 @@ static vlc_v4l2_ctrl_t *ControlAddBoolean (vlc_object_t *obj, int fd,
ctrl.value ? " true" : "false",
query->default_value ? " true" : "false");
val.b_bool = ctrl.value;
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
return c;
}
@@ -459,7 +459,7 @@ static vlc_v4l2_ctrl_t *ControlAddMenu (vlc_object_t *obj, int fd,
msg_Dbg (obj, " current: %"PRId32", default: %"PRId32,
ctrl.value, query->default_value);
val.i_int = ctrl.value;
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
var_Change (obj, c->name, VLC_VAR_SETMINMAX,
&(vlc_value_t){ .i_int = query->minimum },
@@ -533,7 +533,7 @@ static vlc_v4l2_ctrl_t *ControlAddInteger64 (vlc_object_t *obj, int fd,
vlc_value_t val = { .i_int = ext_ctrl.value64 };
msg_Dbg (obj, " current: %"PRId64, val.i_int);
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
return c;
@@ -585,7 +585,7 @@ static vlc_v4l2_ctrl_t *ControlAddString (vlc_object_t *obj, int fd,
vlc_value_t val = { .psz_string = buf };
msg_Dbg (obj, " current: \"%s\"", buf);
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
free (buf);
}
@@ -618,7 +618,7 @@ static vlc_v4l2_ctrl_t *ControlAddBitMask (vlc_object_t *obj, int fd,
msg_Dbg (obj, " current: 0x%08"PRIX32", default: 0x%08"PRIX32,
ctrl.value, query->default_value);
val.i_int = ctrl.value;
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
var_Change (obj, c->name, VLC_VAR_SETMINMAX,
&(vlc_value_t){ .i_int = 0 },
@@ -651,7 +651,7 @@ static vlc_v4l2_ctrl_t *ControlAddIntMenu (vlc_object_t *obj, int fd,
msg_Dbg (obj, " current: %"PRId32", default: %"PRId32,
ctrl.value, query->default_value);
val.i_int = ctrl.value;
- var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(obj, c->name, VLC_VAR_SETVALUE, &val);
}
var_Change (obj, c->name, VLC_VAR_SETMINMAX,
&(vlc_value_t){ .i_int = query->minimum },
diff --git a/modules/gui/skins2/src/theme_repository.cpp b/modules/gui/skins2/src/theme_repository.cpp
index 75cc1664c1..9b0d967759 100644
--- a/modules/gui/skins2/src/theme_repository.cpp
+++ b/modules/gui/skins2/src/theme_repository.cpp
@@ -231,7 +231,7 @@ void ThemeRepository::updateRepository()
}
// mark this current skins as 'checked' in list
- var_Change( getIntf(), "intf-skins", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( getIntf(), "intf-skins", VLC_VAR_SETVALUE, &val );
free( psz_current );
}
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index fba5a1e94e..8ac2c045ae 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -533,7 +533,7 @@ static void aout_PrepareStereoMode (audio_output_t *aout,
}
var_Change(aout, "stereo-mode", VLC_VAR_SETVALUE,
- &(vlc_value_t) { .i_int = i_output_mode }, NULL);
+ &(vlc_value_t) { .i_int = i_output_mode });
}
/**
diff --git a/src/input/event.c b/src/input/event.c
index 42ecae8f98..a1307a9587 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -60,11 +60,11 @@ void input_SendEventPosition( input_thread_t *p_input, double f_position, mtime_
/* */
val.f_float = f_position;
- var_Change( p_input, "position", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "position", VLC_VAR_SETVALUE, &val );
/* */
val.i_int = i_time;
- var_Change( p_input, "time", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "time", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_POSITION );
}
@@ -79,7 +79,7 @@ void input_SendEventLength( input_thread_t *p_input, mtime_t i_length )
input_item_SetDuration( input_priv(p_input)->p_item, i_length );
val.i_int = i_length;
- var_Change( p_input, "length", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "length", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_LENGTH );
}
@@ -92,7 +92,7 @@ void input_SendEventRate( input_thread_t *p_input, int i_rate )
vlc_value_t val;
val.f_float = (float)INPUT_RATE_DEFAULT / (float)i_rate;
- var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_RATE );
}
@@ -101,7 +101,7 @@ void input_SendEventAudioDelay( input_thread_t *p_input, mtime_t i_delay )
vlc_value_t val;
val.i_int = i_delay;
- var_Change( p_input, "audio-delay", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "audio-delay", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_AUDIO_DELAY );
}
@@ -111,7 +111,7 @@ void input_SendEventSubtitleDelay( input_thread_t *p_input, mtime_t i_delay )
vlc_value_t val;
val.i_int = i_delay;
- var_Change( p_input, "spu-delay", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "spu-delay", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_SUBTITLE_DELAY );
}
@@ -122,7 +122,7 @@ void input_SendEventRecord( input_thread_t *p_input, bool b_recording )
vlc_value_t val;
val.b_bool = b_recording;
- var_Change( p_input, "record", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "record", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_RECORD );
}
@@ -132,7 +132,7 @@ void input_SendEventTitle( input_thread_t *p_input, int i_title )
vlc_value_t val;
val.i_int = i_title;
- var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "title", VLC_VAR_SETVALUE, &val );
input_ControlVarTitle( p_input, i_title );
@@ -145,12 +145,12 @@ void input_SendEventSeekpoint( input_thread_t *p_input, int i_title, int i_seekp
/* "chapter" */
val.i_int = i_seekpoint;
- var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val );
/* "title %2u" */
char psz_title[sizeof ("title ") + 3 * sizeof (int)];
sprintf( psz_title, "title %2u", i_title );
- var_Change( p_input, psz_title, VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, psz_title, VLC_VAR_SETVALUE, &val );
/* */
Trigger( p_input, INPUT_EVENT_CHAPTER );
@@ -161,10 +161,10 @@ void input_SendEventSignal( input_thread_t *p_input, double f_quality, double f_
vlc_value_t val;
val.f_float = f_quality;
- var_Change( p_input, "signal-quality", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "signal-quality", VLC_VAR_SETVALUE, &val );
val.f_float = f_strength;
- var_Change( p_input, "signal-strength", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "signal-strength", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_SIGNAL );
}
@@ -174,7 +174,7 @@ void input_SendEventState( input_thread_t *p_input, int i_state )
vlc_value_t val;
val.i_int = i_state;
- var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "state", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_STATE );
}
@@ -184,7 +184,7 @@ void input_SendEventCache( input_thread_t *p_input, double f_level )
vlc_value_t val;
val.f_float = f_level;
- var_Change( p_input, "cache", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "cache", VLC_VAR_SETVALUE, &val );
Trigger( p_input, INPUT_EVENT_CACHE );
}
@@ -341,7 +341,7 @@ static void VarListSelect( input_thread_t *p_input,
vlc_value_t val;
val.i_int = i_value;
- var_Change( p_input, psz_variable, VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, psz_variable, VLC_VAR_SETVALUE, &val );
Trigger( p_input, i_event );
}
diff --git a/src/input/input.c b/src/input/input.c
index a2adbbf995..33aa5e1d5e 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1701,7 +1701,7 @@ static void ViewpointApply( input_thread_t *p_input )
var_SetAddress( pp_vout[i], "viewpoint", &priv->viewpoint );
/* This variable can only be read from callbacks */
var_Change( pp_vout[i], "viewpoint", VLC_VAR_SETVALUE,
- &(vlc_value_t) { .p_address = NULL }, NULL );
+ &(vlc_value_t) { .p_address = NULL } );
vlc_object_release( pp_vout[i] );
}
free( pp_vout );
@@ -1713,7 +1713,7 @@ static void ViewpointApply( input_thread_t *p_input )
var_SetAddress( p_aout, "viewpoint", &priv->viewpoint );
/* This variable can only be read from callbacks */
var_Change( p_aout, "viewpoint", VLC_VAR_SETVALUE,
- &(vlc_value_t) { .p_address = NULL }, NULL );
+ &(vlc_value_t) { .p_address = NULL } );
vlc_object_release( p_aout );
}
}
diff --git a/src/input/var.c b/src/input/var.c
index 835b7b93f6..b41852c7ca 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -133,7 +133,7 @@ void input_ControlVarInit ( input_thread_t *p_input )
/* State */
var_Create( p_input, "state", VLC_VAR_INTEGER );
val.i_int = input_priv(p_input)->i_state;
- var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "state", VLC_VAR_SETVALUE, &val );
/* Rate */
var_Create( p_input, "rate", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
@@ -184,19 +184,19 @@ void input_ControlVarInit ( input_thread_t *p_input )
val.i_int = -1;
/* Video ES */
var_Create( p_input, "video-es", VLC_VAR_INTEGER );
- var_Change( p_input, "video-es", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "video-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Video Track");
var_Change( p_input, "video-es", VLC_VAR_SETTEXT, &text, NULL );
/* Audio ES */
var_Create( p_input, "audio-es", VLC_VAR_INTEGER );
- var_Change( p_input, "audio-es", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "audio-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Audio Track");
var_Change( p_input, "audio-es", VLC_VAR_SETTEXT, &text, NULL );
/* Spu ES */
var_Create( p_input, "spu-es", VLC_VAR_INTEGER );
- var_Change( p_input, "spu-es", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "spu-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Subtitle Track");
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
@@ -596,7 +596,7 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t val;
val.i_int = i_length * newval.f_float;
- var_Change( p_input, "time", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "time", VLC_VAR_SETVALUE, &val );
}
input_ControlPush( p_input, INPUT_CONTROL_SET_POSITION, &newval );
@@ -616,7 +616,7 @@ static int TimeCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t val;
val.f_float = (double)newval.i_int/(double)i_length;
- var_Change( p_input, "position", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "position", VLC_VAR_SETVALUE, &val );
/*
* Notify the intf that a new event has been occurred.
* XXX this is a bit hackish but it's the only way to do it now.
@@ -667,7 +667,7 @@ static int TitleCallback( vlc_object_t *p_this, char const *psz_cmd,
val.i_int = var_GetInteger( p_input, "title" ) + 1;
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &count );
if( val.i_int < count.i_int )
- var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "title", VLC_VAR_SETVALUE, &val );
}
else if( !strcmp( psz_cmd, "prev-title" ) )
{
@@ -675,7 +675,7 @@ static int TitleCallback( vlc_object_t *p_this, char const *psz_cmd,
val.i_int = var_GetInteger( p_input, "title" ) - 1;
if( val.i_int >= 0 )
- var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "title", VLC_VAR_SETVALUE, &val );
}
else if( !strcmp( psz_cmd, "menu-title" ) )
{
@@ -708,7 +708,7 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
val.i_int = var_GetInteger( p_input, "chapter" ) + 1;
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &count );
if( val.i_int < count.i_int )
- var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val );
}
else if( !strcmp( psz_cmd, "prev-chapter" ) )
{
@@ -716,7 +716,7 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
val.i_int = var_GetInteger( p_input, "chapter" ) - 1;
if( val.i_int >= 0 )
- var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val );
}
else
{
@@ -738,12 +738,12 @@ static int NavigationCallback( vlc_object_t *p_this, char const *psz_cmd,
val.i_int = (intptr_t)p_data;
input_ControlPush( p_input, INPUT_CONTROL_SET_TITLE, &val );
- var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
+ var_Change( p_input, "title", VLC_VAR_SETVALUE, &val );
/* And a chapter change */
input_ControlPush( p_input, INPUT_CONTROL_SET_SEEKPOINT, &newval );
- var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &newval, NULL );
+ var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &newval );
return VLC_SUCCESS;
}
diff --git a/src/video_output/interlacing.c b/src/video_output/interlacing.c
index 54f42cdf43..98eb25358a 100644
--- a/src/video_output/interlacing.c
+++ b/src/video_output/interlacing.c
@@ -157,9 +157,9 @@ void vout_InitInterlacingSupport(vout_thread_t *vout, bool is_interlaced)
/* */
val.psz_string = deinterlace_mode ? deinterlace_mode : optm->orig.psz;
- var_Change(vout, "deinterlace-mode", VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(vout, "deinterlace-mode", VLC_VAR_SETVALUE, &val);
val.b_bool = is_interlaced;
- var_Change(vout, "deinterlace-needed", VLC_VAR_SETVALUE, &val, NULL);
+ var_Change(vout, "deinterlace-needed", VLC_VAR_SETVALUE, &val);
var_SetInteger(vout, "deinterlace", deinterlace_state);
free(deinterlace_mode);
More information about the vlc-commits
mailing list