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