From e084dd44550567aaf5e67a3128a16a4cd59ea744 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 15 Jul 2010 02:05:02 +0200 Subject: syntax cleanup --- src/sink_input.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/sink_input.c') diff --git a/src/sink_input.c b/src/sink_input.c index ae5ad83..3d0c1cd 100644 --- a/src/sink_input.c +++ b/src/sink_input.c @@ -7,19 +7,21 @@ #include "sink_input.h" -GArray *sink_input_list_alloc(void) { +GArray *sink_input_list_alloc(void) +{ return g_array_sized_new(false, false, sizeof(sink_input_info), 8); } -static void sink_input_clear(sink_input_info* sink_input) { +static void sink_input_clear(sink_input_info* sink_input) +{ if (sink_input->name != NULL) free(sink_input->name); - if (sink_input->pid != NULL) free(sink_input->pid); } -void sink_input_list_free(GArray *sink_input_list) { +void sink_input_list_free(GArray *sink_input_list) +{ for (int i = 0; i < sink_input_list->len; ++i) sink_input_clear(&g_array_index(sink_input_list, sink_input_info, i)); g_array_free(sink_input_list, true); -- cgit