summaryrefslogtreecommitdiff
path: root/src/network/networkd-neighbor.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-05-13 04:59:56 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-22 04:56:46 +0900
commit7b3a7581e3720d70e11f55124b20570b2ca74438 (patch)
tree4f9e72fb7c181c5849723a9d94ea4f6c24ac1629 /src/network/networkd-neighbor.c
parent234106dbf989fa766612116f325283c087bf25f0 (diff)
downloadsystemd-7b3a7581e3720d70e11f55124b20570b2ca74438.tar.gz
network: make nexthop_add(), nexthop_configure() and friends return 0 on success
After request queue is introduced, the return value on success is unused.
Diffstat (limited to 'src/network/networkd-neighbor.c')
-rw-r--r--src/network/networkd-neighbor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/networkd-neighbor.c b/src/network/networkd-neighbor.c
index 88620579ac..b10c08dec4 100644
--- a/src/network/networkd-neighbor.c
+++ b/src/network/networkd-neighbor.c
@@ -171,7 +171,6 @@ static int neighbor_add_internal(Link *link, Set **neighbors, const Neighbor *in
}
static int neighbor_add(Link *link, const Neighbor *in, Neighbor **ret) {
- bool is_new = false;
Neighbor *neighbor;
int r;
@@ -181,7 +180,6 @@ static int neighbor_add(Link *link, const Neighbor *in, Neighbor **ret) {
r = neighbor_add_internal(link, &link->neighbors, in, &neighbor);
if (r < 0)
return r;
- is_new = true;
} else if (r == 0) {
/* Neighbor is foreign, claim it as recognized */
r = set_ensure_put(&link->neighbors, &neighbor_hash_ops, neighbor);
@@ -197,7 +195,7 @@ static int neighbor_add(Link *link, const Neighbor *in, Neighbor **ret) {
if (ret)
*ret = neighbor;
- return is_new;
+ return 0;
}
static int neighbor_add_foreign(Link *link, const Neighbor *in, Neighbor **ret) {