From 92e4b6a92716f8b2457376291171a6330d072b0d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 9 Nov 2012 21:20:57 +0000 Subject: Update tzcode to 2012i. --- timezone/scheck.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'timezone/scheck.c') diff --git a/timezone/scheck.c b/timezone/scheck.c index 74d9b07..ed60980 100644 --- a/timezone/scheck.c +++ b/timezone/scheck.c @@ -3,20 +3,12 @@ ** 2006-07-17 by Arthur David Olson. */ -#ifndef lint -#ifndef NOID -static char elsieid[] = "@(#)scheck.c 8.19"; -#endif /* !defined lint */ -#endif /* !defined NOID */ - /*LINTLIBRARY*/ #include "private.h" const char * -scheck(string, format) -const char * const string; -const char * const format; +scheck(const char *const string, const char *const format) { register char * fbuf; register const char * fp; @@ -28,7 +20,7 @@ const char * const format; result = ""; if (string == NULL || format == NULL) return result; - fbuf = imalloc((int) (2 * strlen(format) + 4)); + fbuf = malloc(2 * strlen(format) + 4); if (fbuf == NULL) return result; fp = format; @@ -57,7 +49,7 @@ const char * const format; *tp++ = 'c'; *tp = '\0'; if (sscanf(string, fbuf, &dummy) != 1) - result = (char *) format; - ifree(fbuf); + result = format; + free(fbuf); return result; } -- cgit v1.1