summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/sntp/libopts/parse-duration.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/sntp/libopts/parse-duration.c')
-rw-r--r--contrib/ntp/sntp/libopts/parse-duration.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/ntp/sntp/libopts/parse-duration.c b/contrib/ntp/sntp/libopts/parse-duration.c
index e072b7d..11e3d828 100644
--- a/contrib/ntp/sntp/libopts/parse-duration.c
+++ b/contrib/ntp/sntp/libopts/parse-duration.c
@@ -60,14 +60,20 @@ typedef enum {
static unsigned long
str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
{
- return strtoul (str, (char **)ppz, base);
+ char * pz;
+ int rv = strtoul (str, &pz, base);
+ *ppz = pz;
+ return rv;
}
/* Wrapper around strtol that does not require a cast. */
static long
str_const_to_l (cch_t * str, cch_t ** ppz, int base)
{
- return strtol (str, (char **)ppz, base);
+ char * pz;
+ int rv = strtol (str, &pz, base);
+ *ppz = pz;
+ return rv;
}
/* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
OpenPOWER on IntegriCloud