summaryrefslogtreecommitdiff
path: root/gpsd.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 /gpsd.c
parent967c40b2f75321ca93408fde1f577e69f501cfc7 (diff)
downloadgpsd-e1fc91c4288459d0cc5eef3e2108f429ced4fc86.tar.gz
Copy structs using assignment, not memcpy().
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 1 insertions, 1 deletions
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);