mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
simplify output format selection, and passing
Use of enum is a lot more readable than passing strings, and comparing characters, around. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
b524296016
commit
98bcdf9378
4 changed files with 28 additions and 12 deletions
|
|
@ -92,7 +92,7 @@ int parse_leases(void)
|
|||
line[0] = '\0';
|
||||
ipstring = xmalloc(sizeof(char) * MAXLEN);
|
||||
ipstring[0] = '\0';
|
||||
if (config.output_format[0] == 'X' || config.output_format[0] == 'J')
|
||||
if (config.output_format == OUTPUT_ETHERNETS)
|
||||
ethernets = true;
|
||||
while (!feof(dhcpd_leases)) {
|
||||
if (!fgets(line, MAXLEN, dhcpd_leases) && ferror(dhcpd_leases))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue