]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
indentation tweaks
authorHarlan Stenn <stenn@ntp.org>
Fri, 22 May 2020 06:04:57 +0000 (06:04 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 22 May 2020 06:04:57 +0000 (06:04 +0000)
bk: 5ec76b89A3lFcaKSSZkl6LE0i6CUCA

tests/libntp/sockaddrtest.c

index f7c2206ec951d606f48ea31125d0c60f2d77b8ab..5a37fab56fea88a68851c50e0b121d896b52de06 100644 (file)
@@ -26,9 +26,9 @@ IsEqual(const sockaddr_u expected, const sockaddr_u actual) {
        }
 
        if (actual.sa.sa_family == AF_INET) { // IPv4
-               if (expected.sa4.sin_port == actual.sa4.sin_port &&
-                       memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
-                                  sizeof( in )) == 0) {
+               if (   expected.sa4.sin_port == actual.sa4.sin_port
+                   && memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
+                             sizeof( in )) == 0) {
                        return TRUE;
                } else {
                        char buf[4][32];
@@ -41,10 +41,10 @@ IsEqual(const sockaddr_u expected, const sockaddr_u actual) {
                        return FALSE;
                }
        } else if (actual.sa.sa_family == AF_INET6) { //IPv6
-               if (expected.sa6.sin6_port == actual.sa6.sin6_port &&
-                   expected.sa6.sin6_scope_id == actual.sa6.sin6_scope_id &&
-                   memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
-                                  sizeof(in6)) == 0) {
+               if (   expected.sa6.sin6_port == actual.sa6.sin6_port
+                   && expected.sa6.sin6_scope_id == actual.sa6.sin6_scope_id
+                   && memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
+                             sizeof(in6)) == 0) {
                        return TRUE;
                } else {
                        printf("IPv6 comparision failed");