open_and_update_audio_file(): Interchange two arguments.
authorAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 19:35:23 +0000 (20:35 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 19:35:23 +0000 (20:35 +0100)
And add documentation of the "score" parameter.

afs.c
afs.h
aft.c

diff --git a/afs.c b/afs.c
index 355400874377a82cd1b5c085f6d3c729411ce540..353626ee7cd37602e1faaeb37004ba278eb9e3f1 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -492,7 +492,7 @@ int open_next_audio_file(void)
        ret = score_get_best(&aft_row, &score);
        if (ret < 0)
                return ret;
-       ret = open_and_update_audio_file(aft_row, &afd, score);
+       ret = open_and_update_audio_file(aft_row, score, &afd);
        if (ret < 0)
                return ret;
        shmid = ret;
diff --git a/afs.h b/afs.h
index f15b8c559bf8b442674e42409bc0fcea8b65930a..7aea5cb28950305252deddfe37e9c40fde88fa92 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -199,8 +199,8 @@ int get_attribute_text(uint64_t *atts, const char *delim, char **text);
 /* aft */
 void aft_init(struct afs_table *t);
 int aft_get_row_of_path(const char *path, struct osl_row **row);
-int open_and_update_audio_file(struct osl_row *aft_row,
-       struct audio_file_data *afd, long score);
+int open_and_update_audio_file(struct osl_row *aft_row, long score,
+       struct audio_file_data *afd);
 int load_afd(int shmid, struct audio_file_data *afd);
 int load_afsi(struct afs_info *afsi, struct osl_object *obj);
 void save_afsi(struct afs_info *afsi, struct osl_object *obj);
diff --git a/aft.c b/aft.c
index df6c2592cd40c7bebcc0969b7292981ddf09a5d0..ce1f42846e1d81d2fc88d46ec8f177bebd69174c 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -622,6 +622,7 @@ int load_afd(int shmid, struct audio_file_data *afd)
  * Mmap the given audio file and update statistics.
  *
  * \param aft_row Determines the audio file to be opened and updated.
+ * \param score The score of the audio file.
  * \param afd Result pointer.
  *
  * On success, the numplayed field of the audio file selector info is increased
@@ -630,8 +631,8 @@ int load_afd(int shmid, struct audio_file_data *afd)
  *
  * \return Positive shmid on success, negative on errors.
  */
-int open_and_update_audio_file(struct osl_row *aft_row,
-       struct audio_file_data *afd, long score)
+int open_and_update_audio_file(struct osl_row *aft_row, long score,
+       struct audio_file_data *afd)
 {
        HASH_TYPE *aft_hash, file_hash[HASH_SIZE];
        struct osl_object afsi_obj;