aft.c: Simplify load_afd().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 24 Dec 2014 02:52:03 +0000 (02:52 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 19 Apr 2015 11:57:47 +0000 (13:57 +0200)
Remove the pointless variable "buf".

aft.c

diff --git a/aft.c b/aft.c
index 8d32516..ddb2244 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -693,16 +693,13 @@ err:
 int load_afd(int shmid, struct audio_file_data *afd)
 {
        void *shm_afd;
-       char *buf;
        int ret;
 
        ret = shm_attach(shmid, ATTACH_RO, &shm_afd);
        if (ret < 0)
                return ret;
        *afd = *(struct audio_file_data *)shm_afd;
-       buf = shm_afd;
-       buf += sizeof(*afd);
-       load_chunk_table(&afd->afhi, buf);
+       load_chunk_table(&afd->afhi, shm_afd + sizeof(*afd));
        shm_detach(shm_afd);
        return 1;
 }