libnm-core/tests: fix "-Werror=logical-not-parentheses" warning in _sock_addr_endpoint()

    CC       libnm-core/tests/libnm_core_tests_test_general-test-general.o
  In file included from ../shared/nm-default.h:280:0,
                   from ../libnm-core/tests/test-general.c:24:
  ../libnm-core/tests/test-general.c: In function _sock_addr_endpoint:
  ../libnm-core/tests/test-general.c:5911:18: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
    g_assert (!host == (port == -1));
                    ^
  ../shared/nm-utils/nm-macros-internal.h:1793:7: note: in definition of macro __NM_G_BOOLEAN_EXPR_IMPL
     if (expr) \
         ^
  /usr/include/glib-2.0/glib/gmacros.h:376:43: note: in expansion of macro _G_BOOLEAN_EXPR
   #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1))
                                             ^
  /usr/include/glib-2.0/glib/gtestutils.h:116:49: note: in expansion of macro G_LIKELY
                                                if G_LIKELY (expr) ; else \
                                                   ^
  ../libnm-core/tests/test-general.c:5911:2: note: in expansion of macro g_assert
    g_assert (!host == (port == -1));
    ^

Fixes: 713e879d ('libnm: add NMSockAddrEndpoint API')
(cherry picked from commit 1e8c0873)
5 jobs for nm-1-18 in 14 minutes and 55 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
canceled #245940
build_f28

00:14:35

canceled #245941
build_f29

00:14:00

failed #245942
build_f30

00:00:26

canceled #245943
allowed to fail
build_frawhide

00:12:27

passed #245939
allowed to fail
checkpatch

00:00:55

 
Name Stage Failure
failed
build_f30 Test
$ date '+%Y%m%d-%H%M%S'; NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
20190418-075105
Fedora Modular 30 - x86_64 1.7 MB/s | 2.1 MB 00:01
Fedora Modular 30 - x86_64 - Updates 535 B/s | 257 B 00:00
Fedora Modular 30 - x86_64 - Test Updates 3.3 MB/s | 2.9 MB 00:00
Fedora 30 - x86_64 - Test Updates 8.2 MB/s | 15 MB 00:01
Fedora 30 - x86_64 - Updates 336 B/s | 257 B 00:00
./contrib/fedora/REQUIRED_PACKAGES: line 13: 11 Segmentation fault (core dumped) $NM_INSTALL "$@"
ERROR: Job failed: exit code 1