diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-07-15 00:17:16 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-07-15 00:17:16 +0200 |
commit | 8b28bf9e4c0dc7ee03b0187a65a02783a92b4b2a (patch) | |
tree | 49a0c6ab75557c6a2d7a35f66a3743c6f86fbb94 | |
parent | 25edb3357129ebb184fe24de18b8b73e8f35b6fc (diff) | |
download | pa-sink-ctl-8b28bf9e4c0dc7ee03b0187a65a02783a92b4b2a.tar.gz pa-sink-ctl-8b28bf9e4c0dc7ee03b0187a65a02783a92b4b2a.tar.bz2 pa-sink-ctl-8b28bf9e4c0dc7ee03b0187a65a02783a92b4b2a.zip |
sink_clear() marked static (only private use)
-rw-r--r-- | src/sink.c | 21 | ||||
-rw-r--r-- | src/sink.h | 1 |
2 files changed, 11 insertions, 11 deletions
@@ -22,18 +22,9 @@ void sink_list_alloc(GArray **sink_list) { } /* - * frees a complete sink array - */ -void sink_list_free(GArray *sink_list) { - for (int i = 0; i < sink_list->len; ++i) - sink_clear(&g_array_index(sink_list, sink_info, i)); - g_array_free(sink_list, true); -} - -/* * frees all dynamic allocated components of a sink */ -void sink_clear(sink_info* sink) { +static void sink_clear(sink_info* sink) { if (sink->name != NULL) free(sink->name); @@ -44,3 +35,13 @@ void sink_clear(sink_info* sink) { sink_input_list_clear(sink->input_list, &sink->input_max); } +/* + * frees a complete sink array + */ +void sink_list_free(GArray *sink_list) { + for (int i = 0; i < sink_list->len; ++i) + sink_clear(&g_array_index(sink_list, sink_info, i)); + g_array_free(sink_list, true); +} + + @@ -28,6 +28,5 @@ void sink_check_input_list(sink_info*); void sink_list_alloc(GArray **sink_list); void sink_list_free(GArray *sink_list); -void sink_clear(sink_info*); #endif |