diff options
author | Thomas Haller <thaller@redhat.com> | 2020-03-23 08:04:33 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-03-26 21:28:56 +0100 |
commit | 6f9a478b7ded9f767e6f421d582f189c08c33103 (patch) | |
tree | fcef2adc42641e66fea7d4b034ac283d05d7b674 /shared/nm-glib-aux/tests/test-shared-general.c | |
parent | cec06138f173d0dd969dba5acdb3cde4a92884a4 (diff) | |
download | NetworkManager-6f9a478b7ded9f767e6f421d582f189c08c33103.tar.gz |
tests: replace NMTST_SWAP() by new NM_SWAP() macro
NMTST_SWAP() used memcpy() for copying the value, while NM_SWAP() uses
a temporary variable with typeof(). I think the latter is preferable.
Also, the macro is essentially doing the same thing.
Diffstat (limited to 'shared/nm-glib-aux/tests/test-shared-general.c')
-rw-r--r-- | shared/nm-glib-aux/tests/test-shared-general.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/tests/test-shared-general.c b/shared/nm-glib-aux/tests/test-shared-general.c index 28aff95c02..54a96ecb5b 100644 --- a/shared/nm-glib-aux/tests/test-shared-general.c +++ b/shared/nm-glib-aux/tests/test-shared-general.c @@ -296,7 +296,7 @@ _strv_cmp_fuzz_input (const char *const*in, if (nmtst_get_rand_bool ()) { /* randomly swap the original and the clone. That means, out_s1 is either * the input argument (as-is) or the sementically equal clone. */ - NMTST_SWAP (*out_s1, *out_s2); + NM_SWAP (*out_s1, *out_s2); } if (nmtst_get_rand_bool ()) { /* randomly make s1 and s2 the same. This is for testing that |