GTK-UIs: avoid unnecessary variable initialization

In this case it is fairly obvious that new_active and old_active
will both be set before use. There is no need for setting old_active
to FALSE. cppcheck warned about this.
This commit is contained in:
Patrick Ohly 2014-01-07 01:44:10 -08:00
parent 1707566ebe
commit 3f58a4ab2d
2 changed files with 2 additions and 2 deletions

View File

@ -1205,7 +1205,7 @@ static void
autosync_toggle_cb (GtkWidget *widget, gpointer x, app_data *data)
{
if (data->current_service && data->current_service->config) {
gboolean new_active, old_active = FALSE;
gboolean new_active, old_active;
char *autosync = NULL;
new_active = toggle_get_active (widget);

View File

@ -1181,7 +1181,7 @@ static void
autosync_toggle_cb (GtkWidget *widget, gpointer x, app_data *data)
{
if (data->current_service && data->current_service->config) {
gboolean new_active, old_active = FALSE;
gboolean new_active, old_active;
char *autosync = NULL;
new_active = gtk_switch_get_active (GTK_SWITCH (widget));