summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-ipv4ll.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-23 16:13:18 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-26 15:34:42 +0200
commit2f8e763376e932395c859d0ab5a8931b7f27fe18 (patch)
tree9b70354184513fcfdf29f2dca1c76828bdb5d88d /src/libsystemd-network/test-ipv4ll.c
parent9c2438b84e1071a841364250f2dec2b15dafceb7 (diff)
sd-network: rename "index" field of the various clients to "ifindex"
A field "index" is not particularly precise and also might conflict with libc's index() function definition. Also, pretty much everywhere else we call this concept "ifindex", including in networkd, the primary user of these libraries. Hence, let's fix this up and call this "ifindex" everywhere here too.
Diffstat (limited to 'src/libsystemd-network/test-ipv4ll.c')
-rw-r--r--src/libsystemd-network/test-ipv4ll.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-network/test-ipv4ll.c b/src/libsystemd-network/test-ipv4ll.c
index 8cdbfb8ed8..aad3c476a0 100644
--- a/src/libsystemd-network/test-ipv4ll.c
+++ b/src/libsystemd-network/test-ipv4ll.c
@@ -136,11 +136,11 @@ static void test_public_api_setters(sd_event *e) {
assert_se(sd_ipv4ll_set_mac(ll, NULL) == -EINVAL);
assert_se(sd_ipv4ll_set_mac(ll, &mac_addr) == 0);
- assert_se(sd_ipv4ll_set_index(NULL, -1) == -EINVAL);
- assert_se(sd_ipv4ll_set_index(ll, -1) == -EINVAL);
- assert_se(sd_ipv4ll_set_index(ll, -99) == -EINVAL);
- assert_se(sd_ipv4ll_set_index(ll, 1) == 0);
- assert_se(sd_ipv4ll_set_index(ll, 99) == 0);
+ assert_se(sd_ipv4ll_set_ifindex(NULL, -1) == -EINVAL);
+ assert_se(sd_ipv4ll_set_ifindex(ll, -1) == -EINVAL);
+ assert_se(sd_ipv4ll_set_ifindex(ll, -99) == -EINVAL);
+ assert_se(sd_ipv4ll_set_ifindex(ll, 1) == 0);
+ assert_se(sd_ipv4ll_set_ifindex(ll, 99) == 0);
assert_se(sd_ipv4ll_ref(ll) == ll);
assert_se(sd_ipv4ll_unref(ll) == NULL);
@@ -172,7 +172,7 @@ static void test_basic_request(sd_event *e) {
basic_request_handler_userdata) == 0);
assert_se(sd_ipv4ll_start(ll) == -EINVAL);
- assert_se(sd_ipv4ll_set_index(ll, 1) == 0);
+ assert_se(sd_ipv4ll_set_ifindex(ll, 1) == 0);
assert_se(sd_ipv4ll_start(ll) == 0);
sd_event_run(e, (uint64_t) -1);