summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nokia.com>2015-05-02 01:35:33 +0200
committerEric S. Raymond <esr@thyrsus.com>2015-05-31 11:39:57 -0400
commite1fc91c4288459d0cc5eef3e2108f429ced4fc86 (patch)
treed8a6eeb27c2a87557fafe76ce2c68cbaee4521f2 /serial.c
parent967c40b2f75321ca93408fde1f577e69f501cfc7 (diff)
downloadgpsd-e1fc91c4288459d0cc5eef3e2108f429ced4fc86.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 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;
/*