X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=f87ac96e8b62eb2d7c00bb3b6e2130b25b2c9a79;hp=f529416aec375779419a1a936699f6f0584da051;hb=3a6b996d8b39fdc067df352d1eee757ef2a8f49b;hpb=b5c6af5c26bbb2b3d0e6928892bd5d915e329136 diff --git a/aft.c b/aft.c index f529416a..f87ac96e 100644 --- a/aft.c +++ b/aft.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2013 Andre Noll + * Copyright (C) 2007-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -756,7 +756,6 @@ static void get_duration_buf(int seconds, char *buf, struct ls_options *opts) } } - static int write_attribute_items(struct para_buffer *b, const char *att_bitmap, struct afs_info *afsi) { @@ -1111,8 +1110,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score, AFTCOL_CHUNKS, &chunk_table_obj); if (ret < 0) goto err; - ret = mmap_full_file(path, O_RDONLY, &map.data, - &map.size, &afd->fd); + ret = mmap_full_file(path, O_RDONLY, &map.data, &map.size, &afd->fd); if (ret < 0) goto err; hash_function(map.data, map.size, file_hash); @@ -2007,7 +2005,6 @@ int com_add(struct command_context *cc) free(path); } return 1; - } /** @@ -2409,13 +2406,12 @@ static void com_cpsi_callback(int fd, const struct osl_object *query) out: if (ret < 0) para_printf(&cad.pb, "%s\n", para_strerror(-ret)); - else if (cad.flags & CPSI_FLAG_VERBOSE) { - if (pmd.num_matches > 0) + else if (pmd.num_matches > 0) { + if (cad.flags & CPSI_FLAG_VERBOSE) para_printf(&cad.pb, "copied requested afsi from %s " "to %u files\n", source_path, pmd.num_matches); - else - para_printf(&cad.pb, "nothing copied\n"); - } + } else + para_printf(&cad.pb, "no matches - nothing copied\n"); if (cad.pb.offset) pass_buffer_as_shm(fd, SBD_OUTPUT, cad.pb.buf, cad.pb.offset); free(cad.pb.buf); @@ -2597,7 +2593,7 @@ static void afs_stat_callback(int fd, const struct osl_object *query) * is used to pass the status items from the afs process to the command handler * via a shared memory area and a pipe. * - * \return The return value of the underyling call to \ref send_callback_request(). + * \return The return value of the underlying call to \ref send_callback_request(). */ int send_afs_status(struct command_context *cc, int parser_friendly) { @@ -2748,7 +2744,7 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb, { int ret; - switch(event) { + switch (event) { case ATTRIBUTE_REMOVE: { const struct rmatt_event_data *red = data; ret = para_printf(pb, "clearing attribute %s (bit %u) from all "