summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2015-09-21 16:49:59 +0200
committerRonny Chevalier <chevalier.ronny@gmail.com>2015-09-21 16:52:52 +0200
commit5625be76c755c99f8b41d7fe84156ebc732b454c (patch)
treee1e2999dee649e00b3982d711ce2e0b89d747f27 /src/libsystemd-network
parent56065db4214a62a4d9ed4465333fcded35322aa8 (diff)
test-ipv4ll: use unsigned instead of an array for a seed
ipv4ll use an unsigned instead of an uint8_t array. Hence, use an unsigned seed instead of declaring an array and then dereferencing it later.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/test-ipv4ll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/test-ipv4ll.c b/src/libsystemd-network/test-ipv4ll.c
index f0e26bda07..44551e8f82 100644
--- a/src/libsystemd-network/test-ipv4ll.c
+++ b/src/libsystemd-network/test-ipv4ll.c
@@ -100,7 +100,7 @@ int arp_network_bind_raw_socket(int index, be32_t address, const struct ether_ad
}
static void test_public_api_setters(sd_event *e) {
- uint8_t seed[8];
+ unsigned seed = 0;
sd_ipv4ll *ll;
struct ether_addr mac_addr = {
.ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'}};
@@ -118,8 +118,8 @@ static void test_public_api_setters(sd_event *e) {
assert_se(sd_ipv4ll_set_callback(NULL, NULL, NULL) == -EINVAL);
assert_se(sd_ipv4ll_set_callback(ll, NULL, NULL) == 0);
- assert_se(sd_ipv4ll_set_address_seed(NULL, *(unsigned *) seed) == -EINVAL);
- assert_se(sd_ipv4ll_set_address_seed(ll, *(unsigned *) seed) == 0);
+ assert_se(sd_ipv4ll_set_address_seed(NULL, seed) == -EINVAL);
+ assert_se(sd_ipv4ll_set_address_seed(ll, seed) == 0);
assert_se(sd_ipv4ll_set_mac(NULL, NULL) == -EINVAL);
assert_se(sd_ipv4ll_set_mac(ll, NULL) == -EINVAL);