From: Ronny Chevalier Date: Mon, 21 Sep 2015 14:49:59 +0000 (+0200) Subject: test-ipv4ll: use unsigned instead of an array for a seed X-Git-Tag: v227~112^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1317%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/libsystemd-network/test-ipv4ll.c b/src/libsystemd-network/test-ipv4ll.c index f0e26bda072..44551e8f826 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);