From: Jean-Philippe Orsini Date: Tue, 2 Apr 2013 06:53:55 +0000 (+0000) Subject: code style X-Git-Tag: v0.8.0.5~110 X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=7b33d0128c6e26c9098782c9e52becbc1ba8e4b4 code style --- diff --git a/src/ui_sensorpref.c b/src/ui_sensorpref.c index 9032633..01ea462 100644 --- a/src/ui_sensorpref.c +++ b/src/ui_sensorpref.c @@ -491,13 +491,13 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui) GtkTreeView *w_sensors_list; guint ok; GtkListStore *store; - struct psensor **s_cur; + struct psensor **s_cur, *s; GtkTreeSelection *selection; struct cb_data cbdata; + GtkTreeIter iter; cbdata.ui = ui; - cbdata.prefs = sensor_pref_list_new(ui->sensors, - ui->config); + cbdata.prefs = sensor_pref_list_new(ui->sensors, ui->config); builder = gtk_builder_new(); cbdata.builder = builder; @@ -523,15 +523,10 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui) store = GTK_LIST_STORE(gtk_builder_get_object(builder, "sensors_liststore")); - s_cur = ui->sensors; - while (*s_cur) { - GtkTreeIter iter; - struct psensor *s = *s_cur; - + for (s_cur = ui->sensors; *s_cur; s_cur++) { + s = *s_cur; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, COL_NAME, s->name, -1); - - s_cur++; } selection = gtk_tree_view_get_selection(w_sensors_list);