mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 16:28:01 +02:00
keyfile: fix testcase comparison
test-keyfile.c: In function 'test_read_string_ssid': test-keyfile.c:1154:51: error: argument to 'sizeof' in 'memcmp' call is the same expression as the second source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] ASSERT (memcmp (array->data, expected_ssid, sizeof (expected_ssid)) == 0,
This commit is contained in:
parent
8ba3e3da29
commit
1bcf3f6397
1 changed files with 2 additions and 5 deletions
|
|
@ -1151,11 +1151,8 @@ test_read_string_ssid (void)
|
|||
TEST_STRING_SSID_FILE,
|
||||
NM_SETTING_WIRELESS_SETTING_NAME,
|
||||
NM_SETTING_WIRELESS_SSID);
|
||||
ASSERT (memcmp (array->data, expected_ssid, sizeof (expected_ssid)) == 0,
|
||||
"connection-verify-wireless", "failed to verify %s: unexpected %s / %s key value",
|
||||
TEST_STRING_SSID_FILE,
|
||||
NM_SETTING_WIRELESS_SETTING_NAME,
|
||||
NM_SETTING_WIRELESS_SSID);
|
||||
g_assert_cmpint (array->len, ==, strlen (expected_ssid));
|
||||
g_assert (memcmp (array->data, expected_ssid, array->len) == 0);
|
||||
|
||||
g_object_unref (connection);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue