summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nokia.com>2015-04-24 17:46:49 +0200
committerEric S. Raymond <esr@thyrsus.com>2015-04-28 08:25:03 -0400
commitd1965788249d7e22cdde4021d452cf0dc6c6b9bd (patch)
treef643affa49296021751ab98d1420c9d2a1edb16f /serial.c
parent9db980e35547d00c17064ab95ec0986bb2b86081 (diff)
downloadgpsd-d1965788249d7e22cdde4021d452cf0dc6c6b9bd.tar.gz
Copy structs using assignment, not memcpy().
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/serial.c b/serial.c
index 29f14d17..4ae46bbb 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;
/*