diff --git a/src/dhcpd-pools.c b/src/dhcpd-pools.c index 78a6ce0..e3467cb 100644 --- a/src/dhcpd-pools.c +++ b/src/dhcpd-pools.c @@ -246,6 +246,7 @@ int main(int argc, char **argv) shared_net_names + strlen(shared_net_names) + 1, shared_networks); + /* FIXME: move to output.c and use FILE *outfile */ if ((config.output_format[0] == 'x') || (config.output_format[0] == 'X')) { printf("\n"); @@ -271,6 +272,7 @@ int main(int argc, char **argv) if (errno == 25) errno = 0; + /* FIXME: move to output.c and use FILE *outfile */ if ((config.output_format[0] == 'x') || (config.output_format[0] == 'X')) { printf("\n"); diff --git a/src/getdata.c b/src/getdata.c index 2fc1f5f..430468c 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -134,16 +134,16 @@ int parse_leases(void) num_backups++; } - if ((sw_active_lease == 1) + /* FIXME: move to output.c and use FILE *outfile */ + if ((config.output_format[0] == 'X') + && (sw_active_lease == 1) && (strstr(line, "hardware ethernet"))) { nth_field(3, macstring, line); macstring[strlen(macstring) - 1] = '\0'; - if (config.output_format[0] == 'X') { - printf - ("\n\t%s\n\t%s\n\n", - ipstring, macstring); - }; + printf + ("\n\t%s\n\t%s\n\n", + ipstring, macstring); } if ((leasesmallocsize < num_leases) ||