2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 21:38:10 +00:00

Don't try to parse the lease file if it's not there

This commit is contained in:
Ted Lemon 1996-03-06 10:38:53 +00:00
parent 9c238be64c
commit 8e3de495cb
2 changed files with 6 additions and 2 deletions

View File

@ -81,8 +81,10 @@ void read_leases (void)
jmp_buf bc;
/* Open the lease file... */
if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL)
if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) {
warn ("Can't open lease database %s: %m", _PATH_DHCPD_DB);
return;
}
do {
token = next_token (&val, cfile);
if (token == EOF)

View File

@ -81,8 +81,10 @@ void read_leases (void)
jmp_buf bc;
/* Open the lease file... */
if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL)
if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) {
warn ("Can't open lease database %s: %m", _PATH_DHCPD_DB);
return;
}
do {
token = next_token (&val, cfile);
if (token == EOF)