From d1965788249d7e22cdde4021d452cf0dc6c6b9bd Mon Sep 17 00:00:00 2001 From: Zbigniew Chyla Date: Fri, 24 Apr 2015 17:46:49 +0200 Subject: Copy structs using assignment, not memcpy(). --- gps2udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gps2udp.c') diff --git a/gps2udp.c b/gps2udp.c index 2bcb232d..e4f0ed4f 100644 --- a/gps2udp.c +++ b/gps2udp.c @@ -240,7 +240,7 @@ static ssize_t read_gpsd(char *message, size_t len) /* prepare for a blocking read with a 10s timeout */ tv.tv_sec = 10; tv.tv_usec = 0; - memcpy(&fds, &master, sizeof(fd_set)); + fds = master; result = select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv); switch (result) -- cgit v1.2.1