*/
if (errno == ENFILE || errno == EMFILE)
accept_pause();
- else if (errno != EWOULDBLOCK && errno != EINTR &&
- errno != ECONNABORTED)
+ else if (errno != EWOULDBLOCK && errno != EINTR && errno != ECONNABORTED)
log_warn("%s: accept", __func__);
return;
}
c->iev.ev_read = NULL;
- if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) ||
- n == 0) {
+ if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) || n == 0) {
control_close(fd);
return;
}
/* ignore */
break;
case IMSG_CTL_SHOW_INTERFACE:
- if (imsg.hdr.len == IMSG_HEADER_SIZE +
- sizeof(ifidx)) {
+ if (imsg.hdr.len == IMSG_HEADER_SIZE + sizeof(ifidx)) {
memcpy(&ifidx, imsg.data, sizeof(ifidx));
ldpe_iface_ctl(c, ifidx);
- imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
- 0, -1, NULL, 0);
+ imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
}
break;
case IMSG_CTL_SHOW_DISCOVERY:
ldpe_nbr_ctl(c);
break;
case IMSG_CTL_CLEAR_NBR:
- if (imsg.hdr.len != IMSG_HEADER_SIZE +
- sizeof(struct ctl_nbr))
+ if (imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(struct ctl_nbr))
break;
nbr_clear_ctl(imsg.data);
/* ignore */
break;
default:
- log_debug("%s: error handling imsg %d", __func__,
- imsg.hdr.type);
+ log_debug("%s: error handling imsg %d", __func__, imsg.hdr.type);
break;
}
imsg_free(&imsg);
DEBUG_ON(zebra, LDP_DEBUG_ZEBRA);
}
- main_imsg_compose_both(IMSG_DEBUG_UPDATE, &ldp_debug,
- sizeof(ldp_debug));
+ main_imsg_compose_both(IMSG_DEBUG_UPDATE, &ldp_debug, sizeof(ldp_debug));
return (CMD_SUCCESS);
}
if (LDP_DEBUG(labels, LDP_DEBUG_LABELS))
vty_out (vty, " LDP labels debugging is on\n");
if (LDP_DEBUG(msg, LDP_DEBUG_MSG_RECV_ALL))
- vty_out (vty,
- " LDP detailed messages debugging is on (inbound)\n");
+ vty_out (vty, " LDP detailed messages debugging is on (inbound)\n");
else if (LDP_DEBUG(msg, LDP_DEBUG_MSG_RECV))
vty_out (vty," LDP messages debugging is on (inbound)\n");
if (LDP_DEBUG(msg, LDP_DEBUG_MSG_SEND_ALL))
- vty_out (vty,
- " LDP detailed messages debugging is on (outbound)\n");
+ vty_out (vty, " LDP detailed messages debugging is on (outbound)\n");
else if (LDP_DEBUG(msg, LDP_DEBUG_MSG_SEND))
vty_out (vty," LDP messages debugging is on (outbound)\n");
if (LDP_DEBUG(sync, LDP_DEBUG_SYNC))
switch (ldpd_process) {
case PROC_LDE_ENGINE:
vsnprintfrr(buf, sizeof(buf), fmt, ap);
- lde_imsg_compose_parent_sync(IMSG_LOG, pri, buf,
- strlen(buf) + 1);
+ lde_imsg_compose_parent_sync(IMSG_LOG, pri, buf, strlen(buf) + 1);
break;
case PROC_LDP_ENGINE:
vsnprintfrr(buf, sizeof(buf), fmt, ap);
- ldpe_imsg_compose_parent_sync(IMSG_LOG, pri, buf,
- strlen(buf) + 1);
+ ldpe_imsg_compose_parent_sync(IMSG_LOG, pri, buf, strlen(buf) + 1);
break;
case PROC_MAIN:
vzlog(pri, fmt, ap);
fatal(const char *emsg)
{
if (emsg == NULL)
- logit(LOG_CRIT, "fatal in %s: %s", log_procname,
- strerror(errno));
+ logit(LOG_CRIT, "fatal in %s: %s", log_procname, strerror(errno));
else
if (errno)
logit(LOG_CRIT, "fatal in %s: %s: %s",
log_procname, emsg, strerror(errno));
else
- logit(LOG_CRIT, "fatal in %s: %s",
- log_procname, emsg);
+ logit(LOG_CRIT, "fatal in %s: %s", log_procname, emsg);
exit(1);
}
switch (af) {
case AF_INET:
round = (round + 1) % NUM_LOGS;
- if (inet_ntop(AF_INET, &addr->v4, buf[round],
- sizeof(buf[round])) == NULL)
+ if (inet_ntop(AF_INET, &addr->v4, buf[round], sizeof(buf[round])) == NULL)
return ("???");
return (buf[round]);
case AF_INET6:
switch (src->type) {
case HELLO_LINK:
- snprintf(buf, sizeof(buf), "iface %s",
- src->link.ia->iface->name);
+ snprintf(buf, sizeof(buf), "iface %s", src->link.ia->iface->name);
break;
case HELLO_TARGETED:
snprintf(buf, sizeof(buf), "source %s",
}
/* XXX: Only one message can be outstanding. */
- if (hdr.sadb_msg_seq == sadb_msg_seq &&
- hdr.sadb_msg_pid == pid) {
+ if (hdr.sadb_msg_seq == sadb_msg_seq && hdr.sadb_msg_pid == pid) {
if (h)
*h = hdr;
return (0);
{
switch (nbr->auth.method) {
case AUTH_MD5SIG:
- strlcpy(nbr->auth.md5key, nbrp->auth.md5key,
- sizeof(nbr->auth.md5key));
+ strlcpy(nbr->auth.md5key, nbrp->auth.md5key, sizeof(nbr->auth.md5key));
return pfkey_md5sig_establish(nbr, nbrp);
case AUTH_NONE:
return 0;