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:
parent
1707566ebe
commit
3f58a4ab2d
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue