diff options
author | Zbigniew Chyla <zbigniew.chyla@nokia.com> | 2015-04-24 17:55:00 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-04-28 08:29:07 -0400 |
commit | 4f5c06746aef13298b5609558001beda0326da39 (patch) | |
tree | 9b5fc625debe811140309dd7ab0343f09c48c432 /shmexport.c | |
parent | d1965788249d7e22cdde4021d452cf0dc6c6b9bd (diff) | |
download | gpsd-4f5c06746aef13298b5609558001beda0326da39.tar.gz |
Replace overly complex memcpy with struct assignment
Diffstat (limited to 'shmexport.c')
-rw-r--r-- | shmexport.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/shmexport.c b/shmexport.c index 6e7dc274..bd118c9a 100644 --- a/shmexport.c +++ b/shmexport.c @@ -90,9 +90,7 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata) */ shared->bookend2 = tick; memory_barrier(); - memcpy((void *)((char *)context->shmexport + offsetof(struct shmexport_t, gpsdata)), - (void *)gpsdata, - sizeof(struct gps_data_t)); + shared->gpsdata = *gpsdata; memory_barrier(); #ifndef USE_QT shared->gpsdata.gps_fd = SHM_PSEUDO_FD; |