[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] gps2udp: fix port number conversion
From: |
Ferry Huberts |
Subject: |
[gpsd-dev] [PATCH] gps2udp: fix port number conversion |
Date: |
Wed, 18 Dec 2013 15:52:00 +0100 |
From: Ferry Huberts <address@hidden>
Without this modification I always get an errno != 0
Signed-off-by: Ferry Huberts <address@hidden>
---
gps2udp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gps2udp.c b/gps2udp.c
index ac816bc..fa7e205 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -146,6 +146,7 @@ static int open_udp(char **hostport)
return (-1);
}
+ errno = 0;
portnum = atoi(portname);
if (errno != 0) {
(void)fprintf(stderr, "gps2udp: syntax is [-u hostname:port] [%s] is
not a valid port number\n",portname);
--
1.8.3.1
- [gpsd-dev] [PATCH] gps2udp: fix port number conversion,
Ferry Huberts <=