getdata: remote dead code

These few lines has been part of code without any point in releases 2.17 to
3.0 and six and half years.  Oops.

Reference: ae7747db87
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2018-10-26 22:01:26 +01:00
parent 9727bb28b9
commit 4befdeeb47
No known key found for this signature in database
GPG key ID: A9553245FDE9B739

View file

@ -84,7 +84,6 @@ int parse_leases(struct conf_t *state)
FILE *dhcpd_leases;
char *line, *ipstring, macstring[20], *stop;
union ipaddr_t addr;
struct stat lease_file_stats;
struct leases_t *lease;
dhcpd_leases = fopen(state->dhcpdlease_file, "r");
@ -96,12 +95,6 @@ int parse_leases(struct conf_t *state)
error(EXIT_FAILURE, errno, "parse_leases: fadvise %s", state->dhcpdlease_file);
# endif /* POSIX_FADV_SEQUENTIAL */
#endif /* HAVE_POSIX_FADVISE */
/* I found out that there's one lease address per 300 bytes in
* dhcpd.leases file. Malloc is little bit pessimistic and uses 250.
* If someone has higher density in lease file I'm interested to
* hear about that. */
if (stat(state->dhcpdlease_file, &lease_file_stats))
error(EXIT_FAILURE, errno, "parse_leases: %s", state->dhcpdlease_file);
line = xmalloc(sizeof(char) * MAXLEN);
line[0] = '\0';
ipstring = xmalloc(sizeof(char) * MAXLEN);