~milesrout/aether

39192235fcc3842a632a35cb37b542985e28d88d — Miles Rout 1 year, 3 months ago a8d81e0
peertable: Simplify code
1 files changed, 3 insertions(+), 5 deletions(-)

M src/peertable.c
M src/peertable.c => src/peertable.c +3 -5
@@ 57,9 57,8 @@ peertable_init(struct peertable *pt)
void
peertable_finish(struct peertable *pt)
{
	if (pt->table) {
	if (pt->table)
		free(pt->table);
	}
}

static


@@ 211,11 210,10 @@ peer_getnameinfo(struct peer *p)
		p->host, NI_MAXHOST,
		p->service, NI_MAXSERV,
		NI_NUMERICHOST|NI_NUMERICSERV);
	if (gai == EAI_SYSTEM) {
	if (gai == EAI_SYSTEM)
		warn("getnameinfo: %s", gai_strerror(gai));
	} else if (gai) {
	else if (gai)
		warnx("getnameinfo: %s", gai_strerror(gai));
	}

	return gai != 0 ? -1 : 0;
}