summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <benjaminfranzke@googlemail.com>2010-07-15 00:17:16 +0200
committerben <benjaminfranzke@googlemail.com>2010-07-15 00:17:16 +0200
commit8b28bf9e4c0dc7ee03b0187a65a02783a92b4b2a (patch)
tree49a0c6ab75557c6a2d7a35f66a3743c6f86fbb94
parent25edb3357129ebb184fe24de18b8b73e8f35b6fc (diff)
downloadpa-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.c21
-rw-r--r--src/sink.h1
2 files changed, 11 insertions, 11 deletions
diff --git a/src/sink.c b/src/sink.c
index e086a64..38f99f8 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -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);
+}
+
+
diff --git a/src/sink.h b/src/sink.h
index fbc47ee..13b9e79 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -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