summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-ipv4ll.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-21 20:05:18 +0200
committerDaniel Mack <github@zonque.org>2015-09-21 20:05:18 +0200
commit2eacee1e715f3280cf03b9e05d22e4457a91383e (patch)
tree6d7461268cf01b918c69c43caed97a3b4cb4d05d /src/libsystemd-network/test-ipv4ll.c
parentdd2c1128db93410616f1f1ba169e84719f121239 (diff)
parent5625be76c755c99f8b41d7fe84156ebc732b454c (diff)
Merge pull request #1317 from ronnychevalier/rc/ipv4ll_seed
sd-ipv4ll: do not assert_return when seed == 0
Diffstat (limited to 'src/libsystemd-network/test-ipv4ll.c')
-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);