summaryrefslogtreecommitdiff
path: root/src/sink_input.c
diff options
context:
space:
mode:
authorJan Klemkow <web2p10@wemelug.de>2010-07-12 18:59:23 +0200
committerJan Klemkow <web2p10@wemelug.de>2010-07-12 18:59:23 +0200
commit9b566cf3fd0a48107d273081b24f3cc6534e90f6 (patch)
tree3ac7cf81f604bbaa249b215a158fee570901f06a /src/sink_input.c
parent56c5f9340057766c66a7814ab71c111eb0d83cdb (diff)
downloadpa-sink-ctl-9b566cf3fd0a48107d273081b24f3cc6534e90f6.tar.gz
pa-sink-ctl-9b566cf3fd0a48107d273081b24f3cc6534e90f6.tar.bz2
pa-sink-ctl-9b566cf3fd0a48107d273081b24f3cc6534e90f6.zip
wip: bugfix: interface
Diffstat (limited to 'src/sink_input.c')
-rw-r--r--src/sink_input.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sink_input.c b/src/sink_input.c
index 54f7c04..0940a4b 100644
--- a/src/sink_input.c
+++ b/src/sink_input.c
@@ -6,7 +6,7 @@
#include "sink_input.h"
-sink_input_info* sink_input_init() {
+sink_input_info* sink_input_init(void) {
sink_input_info* sink_input = (sink_input_info*) calloc(1, sizeof(sink_input_info));
sink_input->name = NULL;
@@ -32,7 +32,7 @@ sink_input_info** sink_input_list_init(int max) {
sink_input_info** sink_input_list = (sink_input_info**) calloc(max, sizeof(sink_input_info*));
for (int i = 0; i < max; ++i)
- sink_input_list = NULL;
+ sink_input_list[i] = NULL;
return sink_input_list;
}
@@ -58,9 +58,12 @@ void sink_input_list_clear(sink_input_info** sink_input_list, int *max) {
}
void sink_input_check(sink_input_info** sink_input) {
+
+ if (sink_input == NULL)
+ printf("Error: NULL\n");
if ((*sink_input) == NULL)
- (*sink_input) = (sink_input_info*) calloc(1, sizeof(sink_input_info));
+ (*sink_input) = sink_input_init();
}
int cmp_sink_input_list(const void *a, const void *b) {