ls conversion cleanup
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 26 Dec 2016 14:04:18 +0000 (15:04 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
aft.c

diff --git a/aft.c b/aft.c
index aebb3ef..3190a9b 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -891,7 +891,7 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts,
                        last_played_time,
                        bn? bn : "?");
        }
-       write_filename_items(b, d->path, lls_opt_given(r_b) > 0);
+       write_filename_items(b, d->path, lls_opt_given(r_b));
        if (lls_opt_given(r_a))
                WRITE_STATUS_ITEM(b, SI_SCORE, "%li\n", d->score);
        ret = write_attribute_items(b, att_buf, afsi);
@@ -961,8 +961,7 @@ out:
 static int make_status_items(void)
 {
        const struct lls_command *cmd = SERVER_CMD_CMD_PTR(LS);
-       char *argv[] = {"ls", "--path", "--admissible",
-               "--listing-mode=verbose"};
+       char *argv[] = {"ls", "--admissible", "--listing-mode=verbose"};
        struct ls_options opts = {.mode = LS_MODE_VERBOSE};
        struct para_buffer pb = {.max_size = shm_get_shmmax() - 1};
        time_t current_time;
@@ -1211,7 +1210,7 @@ static int prepare_ls_row(struct osl_row *row, void *ls_opts)
 {
        int ret, i;
        struct ls_options *options = ls_opts;
-       bool basename_given = SERVER_CMD_OPT_GIVEN(LS, BASENAME, options->lpr) > 0;
+       bool basename_given = SERVER_CMD_OPT_GIVEN(LS, BASENAME, options->lpr);
        struct ls_data *d;
        struct ls_widths *w;
        unsigned short num_digits;