Remove the pointless variable "buf".
int load_afd(int shmid, struct audio_file_data *afd)
{
void *shm_afd;
int load_afd(int shmid, struct audio_file_data *afd)
{
void *shm_afd;
int ret;
ret = shm_attach(shmid, ATTACH_RO, &shm_afd);
if (ret < 0)
return ret;
*afd = *(struct audio_file_data *)shm_afd;
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;
}
shm_detach(shm_afd);
return 1;
}