summaryrefslogtreecommitdiff
path: root/gpsctl.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 /gpsctl.c
parent9db980e35547d00c17064ab95ec0986bb2b86081 (diff)
downloadgpsd-d1965788249d7e22cdde4021d452cf0dc6c6b9bd.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 655999ad..fc588123 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 */