]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - write_common.c
write: Make get_btr_value() return void.
[paraslash.git] / write_common.c
index 0d30eb8018583b278d79ef6df40a02bb2d771053..b73ba9a11a753244bf23dc6d5f4a2e05985197cb 100644 (file)
@@ -147,30 +147,30 @@ void print_writer_helps(int detailed)
        }
 }
 
-static int get_btr_value(struct btr_node *btrn, const char *key, int32_t *result)
+static void get_btr_value(struct btr_node *btrn, const char *cmd,
+               int32_t *result)
 {
        char *buf = NULL;
-       int ret = btr_exec_up(btrn, key, &buf);
+       int ret = btr_exec_up(btrn, cmd, &buf);
 
-       if (ret < 0)
-               return ret;
+       assert(ret >= 0);
        ret = para_atoi32(buf, result);
+       assert(ret >= 0);
        free(buf);
-       return ret;
 }
 
 /*
  * Ask parent btr nodes for the sample rate of the current stream.
  */
-int get_btr_sample_rate(struct btr_node *btrn, int32_t *result)
+void get_btr_sample_rate(struct btr_node *btrn, int32_t *result)
 {
-       return get_btr_value(btrn, "sample_rate", result);
+       get_btr_value(btrn, "sample_rate", result);
 }
 
 /*
  * Ask parent btr nodes for the channel count of the current stream.
  */
-int get_btr_channels(struct btr_node *btrn, int32_t *result)
+void get_btr_channels(struct btr_node *btrn, int32_t *result)
 {
-       return get_btr_value(btrn, "channels", result);
+       get_btr_value(btrn, "channels", result);
 }