summaryrefslogtreecommitdiff
path: root/sirfmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-06-07 21:09:20 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-06-07 21:09:20 +0000
commit1efc70b98907350347785a6f5e21f9179cbc075b (patch)
treecdd3481e32311862c67f8a96c009b188b4a13a32 /sirfmon.c
parent565f8afb47c2a40f605fcb612f7362c766582a86 (diff)
downloadgpsd-1efc70b98907350347785a6f5e21f9179cbc075b.tar.gz
75 splint warnings with all -unrecog directives removed.
Diffstat (limited to 'sirfmon.c')
-rw-r--r--sirfmon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sirfmon.c b/sirfmon.c
index 25b49f4c..29c5676f 100644
--- a/sirfmon.c
+++ b/sirfmon.c
@@ -45,6 +45,10 @@
#include <sys/select.h>
#endif
+#ifdef S_SPLINT_S
+extern struct tm *localtime_r(const time_t *,/*@out@*/struct tm *tp)/*@modifies tp@*/;
+#endif /* S_SPLINT_S */
+
extern int netlib_connectsock(const char *, const char *, const char *);
#define BUFLEN 2048
@@ -842,7 +846,6 @@ static long tzoffset(void)
struct tm tm;
long res = 0;
- /*@ -unrecog **/
tzset();
#ifdef HAVE_TIMEZONE
res = timezone;
@@ -850,13 +853,12 @@ static long tzoffset(void)
res = localtime_r(&now, &tm)->tm_gmtoff;
#endif
#ifdef HAVE_DAYLIGHT
- if (daylight && localtime_r(&now, &tm)->tm_isdst)
+ if (daylight != 0 && localtime_r(&now, &tm)->tm_isdst != 0)
res -= 3600;
#else
if (localtime_r(&now, &tm)->tm_isdst)
res -= 3600;
#endif
- /*@ +unrecog **/
return res;
}