From: Andre Noll Date: Thu, 1 Nov 2007 17:06:49 +0000 (+0100) Subject: Don't compute attributes string twice. X-Git-Tag: v0.3.0~151 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=045273c289eb3d972eea99df99967f680b06940f;hp=cf11bb88e7cb99775e0b697a9f193a7cab09b699 Don't compute attributes string twice. --- diff --git a/aft.c b/aft.c index e45938d3..133fe672 100644 --- a/aft.c +++ b/aft.c @@ -673,7 +673,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data * int ret = get_hash_of_row(aft_row, &aft_hash); struct afsi_change_event_data aced; struct osl_object map, chunk_table_obj; - char *tmp, *path; + char *path; if (ret < 0) return ret; @@ -714,14 +714,6 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data * ret = load_chunk_info(&chunk_table_obj, &afd->afhi); if (ret < 0) goto err; - ret = get_attribute_text(&afd->afsi.attributes, " ", &tmp); - if (ret < 0) - goto err; - assert(tmp); - strncpy(afd->attributes_string, tmp, sizeof(afd->attributes_string)); - afd->attributes_string[sizeof(afd->attributes_string) - 1] = '\0'; - free(tmp); - { struct ls_data d = { .afhi = afd->afhi,