fix improve variable names

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2015-12-04 19:32:50 +00:00
parent 49835cccb5
commit f5cd7383e4
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
5 changed files with 48 additions and 52 deletions

View file

@ -92,7 +92,7 @@ int parse_leases(void)
line[0] = '\0';
ipstring = xmalloc(sizeof(char) * MAXLEN);
ipstring[0] = '\0';
if (config.output_format == OUTPUT_ETHERNETS)
if (config.print_mac_addreses == 1)
ethernets = true;
while (!feof(dhcpd_leases)) {
if (!fgets(line, MAXLEN, dhcpd_leases) && ferror(dhcpd_leases))
@ -102,8 +102,8 @@ int parse_leases(void)
case PREFIX_LEASE:
stop =
memccpy(ipstring,
line + (config.dhcp_version ==
VERSION_4 ? 6 : 9), ' ', strlen(line));
line + (config.ip_version ==
IPv4 ? 6 : 9), ' ', strlen(line));
if (stop != NULL) {
--stop;
*stop = '\0';