summaryrefslogtreecommitdiff
path: root/ldpd/log.c
diff options
context:
space:
mode:
authorsri-mohan1 <sri.mohan@samsung.com>2023-06-08 23:19:43 +0530
committersri-mohan1 <sri.mohan@samsung.com>2023-06-14 16:42:26 +0530
commit8443d112b398ded67daaaffae0539ffa2a7118a4 (patch)
treeab6c92fccca522a29296cb37247b647e0ed7f7c9 /ldpd/log.c
parent22c329ed32cd83ce54a1f1d014d8056d816cb28b (diff)
ldpd: changes for code maintainability
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
Diffstat (limited to 'ldpd/log.c')
-rw-r--r--ldpd/log.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ldpd/log.c b/ldpd/log.c
index a9898a64f0..7c4d782dcf 100644
--- a/ldpd/log.c
+++ b/ldpd/log.c
@@ -35,13 +35,11 @@ vlog(int pri, const char *fmt, va_list ap)
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);
@@ -121,15 +119,13 @@ void
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);
}