summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gps2udp.c2
-rw-r--r--gpsctl.c4
-rw-r--r--gpsd.c2
-rw-r--r--libgpsd_core.c4
-rw-r--r--serial.c3
5 files changed, 6 insertions, 9 deletions
diff --git a/gps2udp.c b/gps2udp.c
index 77d32be3..af36f1ad 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -240,7 +240,7 @@ static ssize_t read_gpsd(char *message, size_t len)
/* prepare for a blocking read with a 10s timeout */
tv.tv_sec = 10;
tv.tv_usec = 0;
- memcpy(&fds, &master, sizeof(fd_set));
+ fds = master;
result = select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv);
switch (result)
diff --git a/gpsctl.c b/gpsctl.c
index 0e753bd5..4617e163 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -400,9 +400,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
devicelist_entry_matches:;
}
- (void)memcpy(&gpsdata.dev,
- &gpsdata.devices.list[i],
- sizeof(struct devconfig_t));
+ gpsdata.dev = gpsdata.devices.list[i];
devcount = gpsdata.devices.ndevices;
/* if the device has not identified, watch it until it does so */
diff --git a/gpsd.c b/gpsd.c
index 1c4d47de..38c42256 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1754,7 +1754,7 @@ static void netgnss_autoconnect(struct gps_context_t *context,
&& (tp == NULL || hold.dist > tp->dist))
tp = sp;
if (tp != NULL)
- memcpy(tp, &hold, sizeof(struct dgps_server_t));
+ *tp = hold;
}
}
(void)fclose(sfp);
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
diff --git a/serial.c b/serial.c
index b1a3462f..5e67fb1f 100644
--- a/serial.c
+++ b/serial.c
@@ -542,8 +542,7 @@ int gpsd_serial_open(struct gps_device_t *session)
/* Save original terminal parameters */
if (tcgetattr(session->gpsdata.gps_fd, &session->ttyset_old) != 0)
return UNALLOCATED_FD;
- (void)memcpy(&session->ttyset,
- &session->ttyset_old, sizeof(session->ttyset));
+ session->ttyset = session->ttyset_old;
memset(session->ttyset.c_cc, 0, sizeof(session->ttyset.c_cc));
//session->ttyset.c_cc[VTIME] = 1;
/*