mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
networkd: fix dhcp6_prefixes_compare_func()
Found by the following warning by gcc.
```
../src/network/networkd-manager.c: In function 'dhcp6_prefixes_compare_func':
../src/network/networkd-manager.c:1383:16: warning: 'memcmp' reading 16 bytes from a region of size 8 [-Wstringop-overflow=]
return memcmp(&a, &b, sizeof(*a));
^
```
This commit is contained in:
@@ -1380,7 +1380,7 @@ static void dhcp6_prefixes_hash_func(const void *p, struct siphash *state) {
|
||||
static int dhcp6_prefixes_compare_func(const void *_a, const void *_b) {
|
||||
const struct in6_addr *a = _a, *b = _b;
|
||||
|
||||
return memcmp(&a, &b, sizeof(*a));
|
||||
return memcmp(a, b, sizeof(*a));
|
||||
}
|
||||
|
||||
static const struct hash_ops dhcp6_prefixes_hash_ops = {
|
||||
|
||||
Reference in New Issue
Block a user