#include <ctype.h>
#include <isc/tm.h>
+#include <isc/util.h>
/*
* Portable conversion routines for struct tm, replacing
char *
isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
- char c;
+ char c, *ret;
const char *bp;
size_t len = 0;
int alt_format, i, split_year = 0;
alt_format = 0;
/* Eat up white-space. */
- if (isspace(c)) {
- while (isspace(*bp))
+ if (isspace((int) c)) {
+ while (isspace((int) *bp))
bp++;
fmt++;
case 'n': /* Any kind of white-space. */
case 't':
LEGAL_ALT(0);
- while (isspace(*bp))
+ while (isspace((int) *bp))
bp++;
break;
}
/* LINTED functional specification */
- return ((char *)bp);
+ DE_CONST(bp, ret);
+ return (ret);
}