mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
getdata: be consistant with symbolic numbers
The program counts quotes, which is never true/false value, and one of
the symbolic parse state values was missed in bd5ee58.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
51143b6b3c
commit
70c65f4d59
1 changed files with 4 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ int parse_leases(void)
|
|||
char *line, *ipstring, macstring[20];
|
||||
union ipaddr_t addr;
|
||||
struct stat lease_file_stats;
|
||||
int ethernets = false;
|
||||
bool ethernets = false;
|
||||
struct leases_t *lease;
|
||||
|
||||
dhcpd_leases = fopen(config.dhcpdlease_file, "r");
|
||||
|
|
@ -244,7 +244,7 @@ void parse_config(int is_include, const char *restrict config_file,
|
|||
switch (c) {
|
||||
/* Handle comments if they are not quoted */
|
||||
case '#':
|
||||
if (quote == false) {
|
||||
if (quote == 0) {
|
||||
comment = true;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -258,7 +258,7 @@ void parse_config(int is_include, const char *restrict config_file,
|
|||
case '\n':
|
||||
/* New line resets comment section, but
|
||||
* not if quoted */
|
||||
if (quote == false) {
|
||||
if (quote == 0) {
|
||||
comment = false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -269,7 +269,7 @@ void parse_config(int is_include, const char *restrict config_file,
|
|||
}
|
||||
if (comment == false
|
||||
&& argument != ITS_A_RANGE_SECOND_IP
|
||||
&& argument != 4) {
|
||||
&& argument != ITS_AN_INCLUCE) {
|
||||
newclause = true;
|
||||
i = 0;
|
||||
} else if (argument == ITS_A_RANGE_SECOND_IP) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue