aboutsummaryrefslogtreecommitdiff
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2005-06-07 04:14:54 +0000
committerBrooks Davis <brooks@FreeBSD.org>2005-06-07 04:14:54 +0000
commitb5be635a4451e5d2d74cd375f6aef9197b2cd75b (patch)
treee93cfaad438f79ab70a65944b9904ce044948e26 /sbin/dhclient/parse.c
parent1b3bb962f9ce59fdb12072ab92f99a8198799260 (diff)
downloadsrc-b5be635a4451e5d2d74cd375f6aef9197b2cd75b.tar.gz
src-b5be635a4451e5d2d74cd375f6aef9197b2cd75b.zip
NULL is not a valid time_t.
Submitted by: sam
Notes
Notes: svn path=/head/; revision=147077
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index e8870bc12ae3..36eaf7f3bce1 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,5 @@
/* $OpenBSD: parse.c,v 1.11 2004/05/05 23:07:47 deraadt Exp $ */
+/* $FreeBSD$ */
/* Common parser code for dhcpd and dhclient. */
@@ -437,7 +438,7 @@ parse_date(FILE *cfile)
parse_warn("numeric day of week expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_wday = atoi(val);
@@ -447,7 +448,7 @@ parse_date(FILE *cfile)
parse_warn("numeric year expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_year = atoi(val);
if (tm.tm_year > 1900)
@@ -459,7 +460,7 @@ parse_date(FILE *cfile)
parse_warn("expected slash separating year from month.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
/* Month... */
@@ -468,7 +469,7 @@ parse_date(FILE *cfile)
parse_warn("numeric month expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_mon = atoi(val) - 1;
@@ -478,7 +479,7 @@ parse_date(FILE *cfile)
parse_warn("expected slash separating month from day.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
/* Month... */
@@ -487,7 +488,7 @@ parse_date(FILE *cfile)
parse_warn("numeric day of month expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_mday = atoi(val);
@@ -497,7 +498,7 @@ parse_date(FILE *cfile)
parse_warn("numeric hour expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_hour = atoi(val);
@@ -507,7 +508,7 @@ parse_date(FILE *cfile)
parse_warn("expected colon separating hour from minute.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
/* Minute... */
@@ -516,7 +517,7 @@ parse_date(FILE *cfile)
parse_warn("numeric minute expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_min = atoi(val);
@@ -526,7 +527,7 @@ parse_date(FILE *cfile)
parse_warn("expected colon separating hour from minute.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
/* Minute... */
@@ -535,7 +536,7 @@ parse_date(FILE *cfile)
parse_warn("numeric minute expected.");
if (token != SEMI)
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
tm.tm_sec = atoi(val);
tm.tm_isdst = 0;
@@ -548,7 +549,7 @@ parse_date(FILE *cfile)
if (token != SEMI) {
parse_warn("semicolon expected.");
skip_to_semi(cfile);
- return (NULL);
+ return (0);
}
/* Guess the time value... */