X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=audiod_command.c;h=743d73a9277802fbb966b373c2af357c14a88155;hb=44dabcd85164d35a0616f1d505bd48e91a416720;hp=29c330f36a526d1004cb8595248fb75008033438;hpb=5967ac5353739c3ff571dd12d4c6814fa8493ad8;p=paraslash.git diff --git a/audiod_command.c b/audiod_command.c index 29c330f3..743d73a9 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -114,7 +114,7 @@ static int stat_client_add(int fd, uint64_t mask, int parser_friendly) ret = dup(fd); if (ret < 0) return -ERRNO_TO_PARA_ERROR(errno); - new_client = para_calloc(sizeof(*new_client)); + new_client = zalloc(sizeof(*new_client)); new_client->fd = ret; PARA_INFO_LOG("adding client on fd %d\n", new_client->fd); new_client->item_mask = mask; @@ -186,14 +186,7 @@ void stat_client_write_item(int item_num) free(pfpb.buf); } -/** - * Check if string is a known status item. - * - * \param item Buffer containing the text to check. - * - * \return If \a item is a valid status item, the number of that status item is - * returned. Otherwise, this function returns \p -E_UNKNOWN_STAT_ITEM. - */ +/* Check if the given string is a known status item and return its index. */ static int stat_item_valid(const char *item) { int i;