From c9e5659469df79f5aa0790f38d88cf1c21a3df4d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 28 Dec 2015 16:50:53 -0800 Subject: Clean up indentation. Change-Id: I77954f376ba9356f134e5876239838a40f9364ff Reviewed-on: https://code.wireshark.org/review/12899 Reviewed-by: Guy Harris --- ui/cli/tap-simple_stattable.c | 96 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'ui') diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c index e6a8e3cea7..9f52eb458d 100644 --- a/ui/cli/tap-simple_stattable.c +++ b/ui/cli/tap-simple_stattable.c @@ -40,12 +40,12 @@ simple_draw(void *arg) { new_stat_data_t* stat_data = (new_stat_data_t*)arg; table_stat_t* stats = (table_stat_t*)stat_data->user_data; - size_t i; - guint table_index, element, field_index; - stat_tap_table_item* field; - stat_tap_table* table; - stat_tap_table_item_type* field_data; - gchar fmt_string[250]; + size_t i; + guint table_index, element, field_index; + stat_tap_table_item* field; + stat_tap_table* table; + stat_tap_table_item_type* field_data; + gchar fmt_string[250]; /* printing results */ printf("\n"); @@ -53,50 +53,50 @@ simple_draw(void *arg) printf("%s:\n", stat_data->stat_tap_data->title); printf("Filter for statistics: %s\n", stats->filter ? stats->filter : ""); - for (i = 0, field = stat_data->stat_tap_data->fields; i < stat_data->stat_tap_data->nfields; i++, field++) - { + for (i = 0, field = stat_data->stat_tap_data->fields; i < stat_data->stat_tap_data->nfields; i++, field++) + { printf("%s |", field->column_name); - } + } printf("\n"); - /* To iterate is human, and to recurse is divine. I am human */ - for (table_index = 0; table_index < stat_data->stat_tap_data->tables->len; table_index++) - { - table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, table_index); - printf("%s\n", table->title); - for (element = 0; element < table->num_elements; element++) - { - for (field_index = 0, field = stat_data->stat_tap_data->fields; field_index < table->num_fields; field_index++, field++) - { - field_data = new_stat_tap_get_field_data(table, element, field_index); - if (field_data->type == TABLE_ITEM_NONE) /* Nothing for us here */ - break; - - g_snprintf(fmt_string, sizeof(fmt_string), "%s |", field->field_format); - switch(field->type) - { - case TABLE_ITEM_UINT: - printf(fmt_string, field_data->value.uint_value); - break; - case TABLE_ITEM_INT: - printf(fmt_string, field_data->value.int_value); - break; - case TABLE_ITEM_STRING: - printf(fmt_string, field_data->value.string_value); - break; - case TABLE_ITEM_FLOAT: - printf(fmt_string, field_data->value.float_value); - break; - case TABLE_ITEM_ENUM: - printf(fmt_string, field_data->value.enum_value); - break; - case TABLE_ITEM_NONE: - break; - } - } - printf("\n"); - } - } + /* To iterate is human, and to recurse is divine. I am human */ + for (table_index = 0; table_index < stat_data->stat_tap_data->tables->len; table_index++) + { + table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, table_index); + printf("%s\n", table->title); + for (element = 0; element < table->num_elements; element++) + { + for (field_index = 0, field = stat_data->stat_tap_data->fields; field_index < table->num_fields; field_index++, field++) + { + field_data = new_stat_tap_get_field_data(table, element, field_index); + if (field_data->type == TABLE_ITEM_NONE) /* Nothing for us here */ + break; + + g_snprintf(fmt_string, sizeof(fmt_string), "%s |", field->field_format); + switch(field->type) + { + case TABLE_ITEM_UINT: + printf(fmt_string, field_data->value.uint_value); + break; + case TABLE_ITEM_INT: + printf(fmt_string, field_data->value.int_value); + break; + case TABLE_ITEM_STRING: + printf(fmt_string, field_data->value.string_value); + break; + case TABLE_ITEM_FLOAT: + printf(fmt_string, field_data->value.float_value); + break; + case TABLE_ITEM_ENUM: + printf(fmt_string, field_data->value.enum_value); + break; + case TABLE_ITEM_NONE: + break; + } + } + printf("\n"); + } + } printf("=====================================================================================================\n"); } @@ -111,7 +111,7 @@ init_stat_table(stat_tap_table_ui *new_stat_tap, const char *filter) ui->stats.stat_tap_data = new_stat_tap; ui->stats.user_data = ui; - new_stat_tap->stat_tap_init_cb(new_stat_tap, NULL, NULL); + new_stat_tap->stat_tap_init_cb(new_stat_tap, NULL, NULL); error_string = register_tap_listener(new_stat_tap->tap_name, &ui->stats, filter, 0, NULL, new_stat_tap->packet_func, simple_draw); if (error_string) { -- cgit v1.2.3