extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs);
/* parsing. works like strtoul() or strtoull() */
-extern vint64 strtouv64(const char * begp, const char ** endp, int base);
+extern vint64 strtouv64(char const * begp, char const ** const endp, int base);
#endif /*!defined(VINT64OPS_H)*/
void * farg,
int use_build_limit)
{
- char *cp, *ep, linebuf[50];
- vint64 ttime, limit;
- long taiof;
- struct calendar build;
+ char const *ep;
+ char *cp, *endp, linebuf[50];
+ vint64 ttime, limit;
+ long taiof;
+ struct calendar build;
leapsec_clear(pt);
if (use_build_limit && ntpcal_get_build_date(&build)) {
if (parsefail(cp, ep))
goto fail_read;
cp = skipws(ep);
- taiof = strtol(cp, &ep, 10);
- if ( parsefail(cp, ep)
- || taiof > SHRT_MAX || taiof < SHRT_MIN)
+ taiof = strtol(cp, &endp, 10);
+ if ( parsefail(cp, endp)
+ || taiof > INT16_MAX || taiof < INT16_MIN)
goto fail_read;
if (ucmpv64(&ttime, &limit) >= 0) {
if (!leapsec_raw(pt, &ttime,
test_ParseVUI64_pos(void) {
vint64 act, exp;
const char *sp;
- char *ep;
+ char const *ep;
sp = "1234x";
exp.D_s.hi = 0;
test_ParseVUI64_neg(void) {
vint64 act, exp;
const char *sp;
- char *ep;
+ char const *ep;
sp = "-1234x";
exp.D_s.hi = ~0;
test_ParseVUI64_case(void) {
vint64 act, exp;
const char *sp;
- char *ep;
+ char const *ep;
sp = "0123456789AbCdEf";
exp.D_s.hi = 0x01234567;