diff options
author | Zbigniew Chyla <zbigniew.chyla@nokia.com> | 2015-05-02 01:35:33 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-05-31 11:39:57 -0400 |
commit | e1fc91c4288459d0cc5eef3e2108f429ced4fc86 (patch) | |
tree | d8a6eeb27c2a87557fafe76ce2c68cbaee4521f2 /libgpsd_core.c | |
parent | 967c40b2f75321ca93408fde1f577e69f501cfc7 (diff) | |
download | gpsd-e1fc91c4288459d0cc5eef3e2108f429ced4fc86.tar.gz |
Copy structs using assignment, not memcpy().
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index c6ec4a22..a241e559 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -985,7 +985,7 @@ static void gpsd_error_model(struct gps_device_t *session, /* save old fix for later error computations */ if (fix->mode >= MODE_2D) - (void)memcpy(oldfix, fix, sizeof(struct gps_fix_t)); + *oldfix = *fix; } #endif /* NOFLOATS_ENABLE */ @@ -999,7 +999,7 @@ int gpsd_await_data(fd_set *rfds, int status; FD_ZERO(efds); - (void)memcpy((char *)rfds, (char *)all_fds, sizeof(fd_set)); + *rfds = *all_fds; gpsd_log(errout, LOG_RAW + 2, "select waits\n"); /* * Poll for user commands or GPS data. The timeout doesn't |