Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2012 02:21:05 +0000 (UTC)
From:      Greg Lehey <grog@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244168 - head/usr.bin/calendar
Message-ID:  <201212130221.qBD2L5wj014675@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grog
Date: Thu Dec 13 02:21:05 2012
New Revision: 244168
URL: http://svnweb.freebsd.org/changeset/base/244168

Log:
  Use even more conventional conversion routines.
  
  Reported by: peterj@

Modified:
  head/usr.bin/calendar/parsedata.c

Modified: head/usr.bin/calendar/parsedata.c
==============================================================================
--- head/usr.bin/calendar/parsedata.c	Thu Dec 13 01:58:11 2012	(r244167)
+++ head/usr.bin/calendar/parsedata.c	Thu Dec 13 02:21:05 2012	(r244168)
@@ -943,7 +943,7 @@ indextooffset(char *s)
 	char *es;
 
 	if (s[0] == '+' || s[0] == '-') {
-		i = strtod (s, &es);
+		i = strtol (s, &es, 10);
 		if (*es != '\0')                      /* trailing junk */
 			errx (1, "Invalid specifier format: %s\n", s);
 		return (i);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212130221.qBD2L5wj014675>