aboutsummaryrefslogtreecommitdiff
path: root/timezone/scheck.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-09 21:20:57 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-09 21:20:57 +0000
commit92e4b6a92716f8b2457376291171a6330d072b0d (patch)
tree376786acd464b7ec8e556b2336fd66d73c28f956 /timezone/scheck.c
parent9bde902c768916daeec9983dcc0c8c420cd3895d (diff)
downloadglibc-92e4b6a92716f8b2457376291171a6330d072b0d.zip
glibc-92e4b6a92716f8b2457376291171a6330d072b0d.tar.gz
glibc-92e4b6a92716f8b2457376291171a6330d072b0d.tar.bz2
Update tzcode to 2012i.
Diffstat (limited to 'timezone/scheck.c')
-rw-r--r--timezone/scheck.c16
1 files changed, 4 insertions, 12 deletions
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;
}