From 7b7806b85096391e364a03ef3551970620b5492e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 22 Sep 2012 08:59:54 -0400 Subject: Lose the assumption that socket_t is an integer. --- driver_zodiac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'driver_zodiac.c') diff --git a/driver_zodiac.c b/driver_zodiac.c index 9a99c663..63ee40e8 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -87,7 +87,7 @@ static ssize_t zodiac_spew(struct gps_device_t *session, unsigned short type, h.flags = 0; h.csum = zodiac_checksum((unsigned short *)&h, 4); - if (session->gpsdata.gps_fd != -1) { + if (!BAD_SOCKET(session->gpsdata.gps_fd)) { size_t hlen, datlen; hlen = sizeof(h); datlen = sizeof(unsigned short) * dlen; -- cgit v1.2.1