summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-06-07 04:14:54 +0000
committerbrooks <brooks@FreeBSD.org>2005-06-07 04:14:54 +0000
commitc93fbf7bf16de84e88169509f733b1423d2c4108 (patch)
treee93cfaad438f79ab70a65944b9904ce044948e26 /sbin/dhclient
parentbfb49a193954e666cb8b3fa67e9feb76ce673a6f (diff)
downloadFreeBSD-src-c93fbf7bf16de84e88169509f733b1423d2c4108.zip
FreeBSD-src-c93fbf7bf16de84e88169509f733b1423d2c4108.tar.gz
NULL is not a valid time_t.
Submitted by: sam
Diffstat (limited to 'sbin/dhclient')
-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 e8870bc..36eaf7f 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... */
OpenPOWER on IntegriCloud