From 518a2727540cf5e105d28aa8fd31bb6afad05bf6 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 1 Nov 2007 19:06:39 +0100 Subject: [PATCH] Always write image_name and lyrics_name status output. If there is no image_name, print "(none)". Same with lyrics. --- aft.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/aft.c b/aft.c index 95de8801..62db6e7b 100644 --- a/aft.c +++ b/aft.c @@ -816,20 +816,16 @@ static char *make_lyrics_lines(struct afs_info *afsi) char *lyrics_name; lyr_get_name_by_id(afsi->lyrics_id, &lyrics_name); - if (!lyrics_name) - return make_message("lyrics_id: %u\n", afsi->lyrics_id); return make_message("lyrics_id: %u\nlyrics_name: %s\n", - afsi->lyrics_id, lyrics_name); + afsi->lyrics_id, lyrics_name? lyrics_name : "(none)"); } static char *make_image_lines(struct afs_info *afsi) { char *image_name; img_get_name_by_id(afsi->image_id, &image_name); - if (!image_name) - return make_message("image_id: %u\n", afsi->image_id); return make_message("image_id: %u\nimage_name: %s\n", - afsi->image_id, image_name); + afsi->image_id, image_name? image_name : "(none)"); } static int print_list_item(struct ls_data *d, struct ls_options *opts, -- 2.39.5