summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtsold/dump.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
committerume <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
commit958362f6a8e61ad6b4a95057c871838e4d4de29a (patch)
tree178f6af642cf6aacbd3415e4286f66d0b9bd3bba /usr.sbin/rtsold/dump.c
parent0820e437dc59b5da388bb504e58d1f00bd256862 (diff)
downloadFreeBSD-src-958362f6a8e61ad6b4a95057c871838e4d4de29a.zip
FreeBSD-src-958362f6a8e61ad6b4a95057c871838e4d4de29a.tar.gz
KNF, correct typos and cleanup spaces.
Obtained from: KAME MFC after: 1 week
Diffstat (limited to 'usr.sbin/rtsold/dump.c')
-rw-r--r--usr.sbin/rtsold/dump.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/usr.sbin/rtsold/dump.c b/usr.sbin/rtsold/dump.c
index 56f8afc..72d31b9 100644
--- a/usr.sbin/rtsold/dump.c
+++ b/usr.sbin/rtsold/dump.c
@@ -69,29 +69,28 @@ dump_interface_status()
if (ifinfo->probeinterval) {
fprintf(fp, "%d\n", ifinfo->probeinterval);
fprintf(fp, " probe timer: %d\n", ifinfo->probetimer);
- }
- else {
+ } else {
fprintf(fp, "infinity\n");
fprintf(fp, " no probe timer\n");
}
fprintf(fp, " interface status: %s\n",
- ifinfo->active > 0 ? "active" : "inactive");
+ ifinfo->active > 0 ? "active" : "inactive");
fprintf(fp, " other config: %s\n",
ifinfo->otherconfig ? "on" : "off");
fprintf(fp, " rtsold status: %s\n", ifstatstr[ifinfo->state]);
fprintf(fp, " carrier detection: %s\n",
- ifinfo->mediareqok ? "available" : "unavailable");
+ ifinfo->mediareqok ? "available" : "unavailable");
fprintf(fp, " probes: %d, dadcount = %d\n",
- ifinfo->probes, ifinfo->dadcount);
+ ifinfo->probes, ifinfo->dadcount);
if (ifinfo->timer.tv_sec == tm_max.tv_sec &&
ifinfo->timer.tv_usec == tm_max.tv_usec)
fprintf(fp, " no timer\n");
else {
fprintf(fp, " timer: interval=%d:%d, expire=%s\n",
- (int)ifinfo->timer.tv_sec,
- (int)ifinfo->timer.tv_usec,
- (ifinfo->expire.tv_sec < now.tv_sec) ? "expired"
- : sec2str(ifinfo->expire.tv_sec - now.tv_sec));
+ (int)ifinfo->timer.tv_sec,
+ (int)ifinfo->timer.tv_usec,
+ (ifinfo->expire.tv_sec < now.tv_sec) ? "expired"
+ : sec2str(ifinfo->expire.tv_sec - now.tv_sec));
}
fprintf(fp, " number of valid RAs: %d\n", ifinfo->racnt);
}
@@ -103,12 +102,10 @@ rtsold_dump_file(dumpfile)
{
if ((fp = fopen(dumpfile, "w")) == NULL) {
warnmsg(LOG_WARNING, __func__, "open a dump file(%s): %s",
- dumpfile, strerror(errno));
+ dumpfile, strerror(errno));
return;
}
-
dump_interface_status();
-
fclose(fp);
}
@@ -139,6 +136,5 @@ sec2str(total)
p += sprintf(p, "%dm", mins);
}
sprintf(p, "%ds", secs);
-
return(result);
}
OpenPOWER on IntegriCloud