summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_time.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2001-07-23 02:14:22 +0000
committerHarald Welte <laforge@gnumonks.org>2001-07-23 02:14:22 +0000
commitb47197629735fa1cb93112dfd7d1c4fbcdb24a95 (patch)
tree6b34d5dfc6bca2aff38c5e6f406c0f1700fe8836 /extensions/libipt_time.c
parented498493949c34e4b3292e93b41cda6776b7915e (diff)
further fixes of string_to_number fixes
Diffstat (limited to 'extensions/libipt_time.c')
-rw-r--r--extensions/libipt_time.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/libipt_time.c b/extensions/libipt_time.c
index 1d7690ca..10b37885 100644
--- a/extensions/libipt_time.c
+++ b/extensions/libipt_time.c
@@ -76,7 +76,7 @@ split_time(char **part1, char **part2, const char *str_2_parse)
}
static void
-parse_time_string(int *hour, int *minute, const char *time)
+parse_time_string(unsigned int *hour, unsigned int *minute, const char *time)
{
char *hours;
char *minutes;
@@ -94,8 +94,10 @@ parse_time_string(int *hour, int *minute, const char *time)
hours[0] = ' ';
if (minutes[0] == '0')
minutes[0] = ' ';
- *hour = string_to_number(hours, 0, 23);
- *minute = string_to_number(minutes, 0, 59);
+
+ /* FIXME: error checking */
+ string_to_number(hours, 0, 23, hour);
+ string_to_number(minutes, 0, 59, minute);
}
if ((*hour != (-1)) && (*minute != (-1))) {
free(hours);