From 3b59239f650cf04bd07223539228b4a37e615dab Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 24 Dec 2014 02:52:03 +0000 Subject: [PATCH 1/1] aft.c: Simplify load_afd(). Remove the pointless variable "buf". --- aft.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aft.c b/aft.c index 8d32516d..ddb2244a 100644 --- 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; } -- 2.39.2