]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - recv_common.c
string: Rename para_malloc() -> alloc().
[paraslash.git] / recv_common.c
index 1ad84438026ce8f724ddf8d1fba8547a96276fb6..2d3ae2cddaa9bf776d844f509cc3a3d567d37ce3 100644 (file)
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file recv_common.c common functions of para_recv and para_audiod */
 
 #include "recv.h"
 #include "string.h"
 
-/**
- * Call the init function of each paraslash receiver.
- *
- * Receivers employ the user_data feature of the lopsub library: Each receiver
- * of the recv_cmd suite defines a struct receiver as its user data.
- * recv_init() obtains a pointer to this structure by calling lls_user_data().
- * If the receiver has an init function (i.e., if ->init is not NULL), ->init()
- * is called to initialize the receiver.
- */
-void recv_init(void)
-{
-       int i;
-
-       FOR_EACH_RECEIVER(i) {
-               const struct lls_command *cmd = RECV_CMD(i);
-               const struct receiver *r = lls_user_data(cmd);
-               if (r && r->init)
-                       r->init();
-       }
-}
-
 /**
  * Check if the given string is a valid receiver specifier.
  *
@@ -66,7 +41,7 @@ int check_receiver_arg(const char *ra, struct lls_parse_result **lprp)
        *lprp = NULL;
        if (!ra || !*ra) {
                argc = 1;
-               argv = para_malloc(2 * sizeof(char*));
+               argv = alloc(2 * sizeof(char*));
                argv[0] = para_strdup("http");
                argv[1] = NULL;
        } else {