summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6d.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /ospf6d/ospf6d.h
parent888ac268a0077fc9ebd1218cec6ae472af0bfc40 (diff)
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6d.h')
-rw-r--r--ospf6d/ospf6d.h69
1 files changed, 33 insertions, 36 deletions
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index 2da11d0abf..1515c3ad0c 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -57,31 +57,31 @@ extern struct thread_master *master;
#define OSPF6_NEIGHBOR(x) ((struct ospf6_neighbor *) (x))
/* operation on timeval structure */
-#define timerstring(tv, buf, size) \
- do { \
- if ((tv)->tv_sec / 60 / 60 / 24) \
- snprintf (buf, size, "%lldd%02lld:%02lld:%02lld", \
- (tv)->tv_sec / 60LL / 60 / 24, \
- (tv)->tv_sec / 60LL / 60 % 24, \
- (tv)->tv_sec / 60LL % 60, \
- (tv)->tv_sec % 60LL); \
- else \
- snprintf (buf, size, "%02lld:%02lld:%02lld", \
- (tv)->tv_sec / 60LL / 60 % 24, \
- (tv)->tv_sec / 60LL % 60, \
- (tv)->tv_sec % 60LL); \
- } while (0)
-
-#define threadtimer_string(now, t, buf, size) \
- do { \
- struct timeval result; \
- if (!t) \
- snprintf(buf, size, "inactive"); \
- else { \
- timersub(&t->u.sands, &now, &result); \
- timerstring(&result, buf, size); \
- } \
-} while (0)
+#define timerstring(tv, buf, size) \
+ do { \
+ if ((tv)->tv_sec / 60 / 60 / 24) \
+ snprintf(buf, size, "%lldd%02lld:%02lld:%02lld", \
+ (tv)->tv_sec / 60LL / 60 / 24, \
+ (tv)->tv_sec / 60LL / 60 % 24, \
+ (tv)->tv_sec / 60LL % 60, \
+ (tv)->tv_sec % 60LL); \
+ else \
+ snprintf(buf, size, "%02lld:%02lld:%02lld", \
+ (tv)->tv_sec / 60LL / 60 % 24, \
+ (tv)->tv_sec / 60LL % 60, \
+ (tv)->tv_sec % 60LL); \
+ } while (0)
+
+#define threadtimer_string(now, t, buf, size) \
+ do { \
+ struct timeval result; \
+ if (!t) \
+ snprintf(buf, size, "inactive"); \
+ else { \
+ timersub(&t->u.sands, &now, &result); \
+ timerstring(&result, buf, size); \
+ } \
+ } while (0)
/* for commands */
#define OSPF6_AREA_STR "Area information\n"
@@ -90,20 +90,17 @@ extern struct thread_master *master;
#define OSPF6_ROUTER_ID_STR "Specify Router-ID\n"
#define OSPF6_LS_ID_STR "Specify Link State ID\n"
-#define OSPF6_CMD_CHECK_RUNNING() \
- if (ospf6 == NULL) \
- { \
- vty_out (vty, "OSPFv3 is not running\n"); \
- return CMD_SUCCESS; \
- }
+#define OSPF6_CMD_CHECK_RUNNING() \
+ if (ospf6 == NULL) { \
+ vty_out(vty, "OSPFv3 is not running\n"); \
+ return CMD_SUCCESS; \
+ }
/* Function Prototypes */
-extern struct route_node *route_prev (struct route_node *node);
+extern struct route_node *route_prev(struct route_node *node);
-extern void ospf6_debug (void);
-extern void ospf6_init (void);
+extern void ospf6_debug(void);
+extern void ospf6_init(void);
#endif /* OSPF6D_H */
-
-