From: Andre Noll Date: Fri, 7 Sep 2018 10:44:08 +0000 (+0200) Subject: aft: Change return type of make_status_items() to void. X-Git-Tag: v0.6.3~71 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=85ec8f30f6bef37a9a3bc2b84314654648f2f81c aft: Change return type of make_status_items() to void. All callers ignore the return value anyway. However, let's print a warning in the failure case. --- diff --git a/aft.c b/aft.c index 0544091b..b6ea0257 100644 --- a/aft.c +++ b/aft.c @@ -994,7 +994,7 @@ void free_status_items(void) freep(&parser_friendly_status_items); } -static int make_status_items(void) +static void make_status_items(void) { const struct lls_command *cmd = SERVER_CMD_CMD_PTR(LS); char *argv[] = {"ls", "--admissible", "--listing-mode=verbose"}; @@ -1005,7 +1005,7 @@ static int make_status_items(void) free_status_items(); if (!status_item_ls_data.path) /* no audio file open */ - return 0; + return; ret = lls_parse(ARRAY_SIZE(argv), argv, cmd, &opts.lpr, NULL); assert(ret >= 0); time(¤t_time); @@ -1025,10 +1025,12 @@ static int make_status_items(void) parser_friendly_status_items = pb.buf; ret = 1; out: - if (ret < 0) + if (ret < 0) { + PARA_WARNING_LOG("could not create status items: %s\n", + para_strerror(-ret)); free_status_items(); + } lls_free_parse_result(opts.lpr, cmd); - return ret; } /**