summaryrefslogtreecommitdiff
path: root/ripngd/ripng_offset.c
diff options
context:
space:
mode:
authorsri-mohan1 <sri.mohan@samsung.com>2023-06-21 22:26:43 +0530
committersri-mohan1 <sri.mohan@samsung.com>2023-06-21 22:39:13 +0530
commit3a40f78305a9fd1ada66ca8fc34e45018b1a273a (patch)
treecaf976593b3368804710d9f99f9d4c1ea7982429 /ripngd/ripng_offset.c
parentfd8a8b759629003d98d03b4ab5e5f8ef7cd0768e (diff)
ripngd: 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 'ripngd/ripng_offset.c')
-rw-r--r--ripngd/ripng_offset.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c
index ba3ba558af..d842f15a19 100644
--- a/ripngd/ripng_offset.c
+++ b/ripngd/ripng_offset.c
@@ -83,9 +83,8 @@ int ripng_offset_list_apply_in(struct ripng *ripng, struct prefix_ipv6 *p,
alist = access_list_lookup(AFI_IP6,
OFFSET_LIST_IN_NAME(offset));
- if (alist
- && access_list_apply(alist, (struct prefix *)p)
- == FILTER_PERMIT) {
+ if (alist && access_list_apply(alist, (struct prefix *)p) ==
+ FILTER_PERMIT) {
*metric += OFFSET_LIST_IN_METRIC(offset);
return 1;
}
@@ -97,9 +96,8 @@ int ripng_offset_list_apply_in(struct ripng *ripng, struct prefix_ipv6 *p,
alist = access_list_lookup(AFI_IP6,
OFFSET_LIST_IN_NAME(offset));
- if (alist
- && access_list_apply(alist, (struct prefix *)p)
- == FILTER_PERMIT) {
+ if (alist && access_list_apply(alist, (struct prefix *)p) ==
+ FILTER_PERMIT) {
*metric += OFFSET_LIST_IN_METRIC(offset);
return 1;
}
@@ -121,9 +119,8 @@ int ripng_offset_list_apply_out(struct ripng *ripng, struct prefix_ipv6 *p,
alist = access_list_lookup(AFI_IP6,
OFFSET_LIST_OUT_NAME(offset));
- if (alist
- && access_list_apply(alist, (struct prefix *)p)
- == FILTER_PERMIT) {
+ if (alist && access_list_apply(alist, (struct prefix *)p) ==
+ FILTER_PERMIT) {
*metric += OFFSET_LIST_OUT_METRIC(offset);
return 1;
}
@@ -136,9 +133,8 @@ int ripng_offset_list_apply_out(struct ripng *ripng, struct prefix_ipv6 *p,
alist = access_list_lookup(AFI_IP6,
OFFSET_LIST_OUT_NAME(offset));
- if (alist
- && access_list_apply(alist, (struct prefix *)p)
- == FILTER_PERMIT) {
+ if (alist && access_list_apply(alist, (struct prefix *)p) ==
+ FILTER_PERMIT) {
*metric += OFFSET_LIST_OUT_METRIC(offset);
return 1;
}