]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add couple missing braces around single-line statements
authorOndřej Surý <ondrej@isc.org>
Sun, 13 Mar 2022 12:13:16 +0000 (13:13 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 17 Mar 2022 17:31:36 +0000 (18:31 +0100)
The clang-format-15 has new option InsertBraces that could add missing
branches around single line statements.  Use that to our advantage
without switching to not-yet-released LLVM version to add missing braces
in couple of places.

25 files changed:
bin/nsupdate/nsupdate.c
bin/pkcs11/pkcs11-destroy.c
bin/pkcs11/pkcs11-list.c
bin/tests/pkcs11/benchmarks/create.c
bin/tests/pkcs11/benchmarks/login.c
bin/tests/pkcs11/benchmarks/privrsa.c
bin/tests/pkcs11/benchmarks/pubrsa.c
bin/tests/pkcs11/benchmarks/session.c
contrib/dlz/drivers/dlz_mysql_driver.c
contrib/dlz/drivers/dlz_postgres_driver.c
contrib/dlz/example/dlz_example.c
contrib/dlz/modules/mysql/dlz_mysql_dynamic.c
contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c
contrib/dlz/modules/sqlite3/dlz_sqlite3_dynamic.c
contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c
lib/dns/openssleddsa_link.c
lib/dns/pkcs11ecdsa_link.c
lib/dns/pkcs11eddsa_link.c
lib/dns/pkcs11rsa_link.c
lib/dns/rdata/generic/gpos_27.c
lib/dns/rdata/generic/hip_55.c
lib/isc/unix/socket.c
lib/isc/win32/dir.c
lib/isc/win32/interfaceiter.c
lib/isc/win32/socket.c

index da64e6efacb0e8cd172a9ab3b3c67f7c140c8089..c11c2194ed70bc19b724fa9a094786f6b468d9d0 100644 (file)
@@ -763,8 +763,9 @@ doshutdown(void) {
 static void
 maybeshutdown(void) {
        /* when called from getinput, doshutdown might be already finished */
-       if (requestmgr == NULL)
+       if (requestmgr == NULL) {
                return;
+       }
 
        ddebug("Shutting down request manager");
        dns_requestmgr_shutdown(requestmgr);
index 188d38956b35863cee4064de8c6490e74a3369ce..04f96820e5315fba6c9878203fbfdd9446f2d8f8 100644 (file)
@@ -217,8 +217,9 @@ main(int argc, char *argv[]) {
                if (len > 0) {
                        printf("0x");
                }
-               for (j = 0; j < len; j++)
+               for (j = 0; j < len; j++) {
                        printf("%02x", idbuf[j]);
+               }
                if (attr_template[2].ulValueLen > len) {
                        printf("...\n");
                } else {
index b1177b286b27e70f3b7c05bac481cbc0ccdeb3d9..1fdd8a85fcac8f56c7ff5f1a334b728c98c0af34 100644 (file)
@@ -241,8 +241,9 @@ main(int argc, char *argv[]) {
                                if (len > 0) {
                                        printf("0x");
                                }
-                               for (j = 0; j < len; j++)
+                               for (j = 0; j < len; j++) {
                                        printf("%02x", idbuf[j]);
+                               }
                                if (template[2].ulValueLen > len) {
                                        printf("...");
                                }
index 01224c281c750099340bc46d339ec91b69802987..2f1c365d6ddf2124db8322c03118e73392884f98 100644 (file)
@@ -160,8 +160,9 @@ main(int argc, char *argv[]) {
                perror("malloc");
                exit(1);
        }
-       for (i = 0; i < count; i++)
+       for (i = 0; i < count; i++) {
                hKey[i] = CK_INVALID_HANDLE;
+       }
 
        /* Initialize the CRYPTOKI library */
        if (lib_name != NULL) {
index 1480489c3e2f6592cd858b00bea4b8f0eb70672f..70dd0a179496f67cdfcb9aab2580abdf8985f29e 100644 (file)
@@ -137,8 +137,9 @@ main(int argc, char *argv[]) {
                perror("malloc");
                exit(1);
        }
-       for (i = 0; i < count; i++)
+       for (i = 0; i < count; i++) {
                hSession[i] = CK_INVALID_HANDLE;
+       }
 
        /* Initialize the CRYPTOKI library */
        if (lib_name != NULL) {
index ea5151c79f96d936f80ad9b2f0cfb1689f72ab41..bd6911ebd50806b0af57330487ff13b6ed10f467 100644 (file)
@@ -233,8 +233,9 @@ main(int argc, char *argv[]) {
                perror("malloc");
                exit(1);
        }
-       for (i = 0; i < count; i++)
+       for (i = 0; i < count; i++) {
                hKey[i] = CK_INVALID_HANDLE;
+       }
 
        /* Initialize the CRYPTOKI library */
        if (lib_name != NULL) {
index 814ce10f03dfa1b441e1375774436ad5627c7516..1036df73d56191037c48e0d26166895970f2e568 100644 (file)
@@ -179,8 +179,9 @@ main(int argc, char *argv[]) {
                perror("malloc");
                exit(1);
        }
-       for (i = 0; i < count; i++)
+       for (i = 0; i < count; i++) {
                hKey[i] = CK_INVALID_HANDLE;
+       }
 
        /* Initialize the CRYPTOKI library */
        if (lib_name != NULL) {
index 3925c9215f30dc734a6c7378e4df73146f7812fc..69f823ff0069c56e3143c41b2103e857677242f3 100644 (file)
@@ -132,8 +132,9 @@ main(int argc, char *argv[]) {
                perror("malloc");
                exit(1);
        }
-       for (i = 0; i < count; i++)
+       for (i = 0; i < count; i++) {
                hSession[i] = CK_INVALID_HANDLE;
+       }
 
        /* Initialize the CRYPTOKI library */
        if (lib_name != NULL) {
index f888850c832e24f93af8e4cb0806362321dddeb9..eee61c22356996f5bd243f8ad3e13e0ede5c10d7 100644 (file)
@@ -289,7 +289,9 @@ mysql_get_resultset(const char *zone, const char *record, const char *client,
                        break;
                }
                for (j = 0; mysql_ping((MYSQL *)dbi->dbconn) != 0 && j < 4; j++)
+               {
                        ;
+               }
        }
 
        if (qres == 0) {
index 3069b9cd614a4856d7a0ef96ad2c007fad457e71..ca9b7063194cfa693dc5860e3d6f1926efcd7b23 100644 (file)
@@ -1108,8 +1108,9 @@ postgres_create(const char *dlzname, unsigned int argc, char *argv[],
                /* if we cannot connect the first time, try 3 more times. */
                for (j = 0;
                     PQstatus((PGconn *)dbi->dbconn) != CONNECTION_OK && j < 3;
-                    j++)
+                    j++) {
                        PQreset((PGconn *)dbi->dbconn);
+               }
 
                /*
                 * if multi threaded, let user know which connection
index 88c009ef5276373fdee43f6da0e1cc8837e58a78..1a23be933b1a91bc8a344f3b483f474835ffaf3f 100644 (file)
@@ -474,8 +474,9 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
        }
 
        if (strcmp(name, "too-long") == 0) {
-               for (i = 0; i < 511; i++)
+               for (i = 0; i < 511; i++) {
                        buf[i] = 'x';
+               }
                buf[i] = '\0';
                found = true;
                result = state->putrr(lookup, "TXT", 0, buf);
index 81b46aa79ec5f1f13a7946f4dfd8a38aaf09f1be..b9da2f57889f2bfb2d002ca7056dfea746f2adeb 100644 (file)
@@ -482,8 +482,9 @@ mysql_process_rs(mysql_instance_t *db, dns_sdlzlookup_t *lookup,
                         * ones together.  figure out how long to make
                         * string.
                         */
-                       for (j = 2; j < fields; j++)
+                       for (j = 2; j < fields; j++) {
                                len += strlen(safeGet(row[j])) + 1;
+                       }
 
                        /*
                         * allocate string memory, allow for NULL to
@@ -682,8 +683,9 @@ dlz_allnodes(const char *zone, void *dbdata, dns_sdlzallnodes_t *allnodes) {
                         * more than 4 fields, concatenate the last
                         * ones together.
                         */
-                       for (j = 3; j < fields; j++)
+                       for (j = 3; j < fields; j++) {
                                len += strlen(safeGet(row[j])) + 1;
+                       }
 
                        tmpString = malloc(len + 1);
                        if (tmpString == NULL) {
index d0204c6b993154daadc6a19cc505d3c70425d156..ec6a494dd84723fdf074fa98bd5d3bdd80fdbcf9 100644 (file)
@@ -706,8 +706,9 @@ make_notify(const char *zone, int *packetlen) {
        /* Make the question into labels */
        j = 12;
        while (packet[j]) {
-               for (i = j + 1; packet[i] != '\0' && packet[i] != '.'; i++)
+               for (i = j + 1; packet[i] != '\0' && packet[i] != '.'; i++) {
                        ;
+               }
                packet[j] = i - j - 1;
                j = i;
        }
index c2a8958d6a36f2262fc76ffe5b9c8694d2e25e33..26921ae0a0c05c23187273a9883c41c78dc8a99a 100644 (file)
@@ -551,8 +551,9 @@ sqlite3_process_rs(sqlite3_instance_t *db, dns_sdlzlookup_t *lookup,
                         * ones together.  figure out how long to make
                         * string.
                         */
-                       for (j = 2; j < fields; j++)
+                       for (j = 2; j < fields; j++) {
                                len += strlen(safeGet(row[j])) + 1;
+                       }
 
                        /*
                         * allocate string memory, allow for NULL to
@@ -753,8 +754,9 @@ dlz_allnodes(const char *zone, void *dbdata, dns_sdlzallnodes_t *allnodes) {
                         * more than 4 fields, concatenate the last
                         * ones together.
                         */
-                       for (j = 3; j < fields; j++)
+                       for (j = 3; j < fields; j++) {
                                len += strlen(safeGet(row[j])) + 1;
+                       }
 
                        tmpString = malloc(len + 1);
                        if (tmpString == NULL) {
index d108796c008c62bdbfe9d0d74f0c08e483609e06..1090d780f097c13763806086fba5fd10e618b819 100644 (file)
@@ -585,7 +585,7 @@ fnmatch(const char *pattern, const char *string, int flags) {
        char *newp;
        char c, test;
 
-       for (stringstart = string;;)
+       for (stringstart = string;;) {
                switch (c = *pattern++) {
                case EOS:
                        if ((flags & FNM_LEADING_DIR) && *string == '/') {
@@ -698,6 +698,7 @@ fnmatch(const char *pattern, const char *string, int flags) {
                        string++;
                        break;
                }
+       }
        /* NOTREACHED */
 }
 
index 73ef9438b11de163d6c863629121c00aa30f18ce..b5ab3b3d8a21f7aae7aa801929cfb5fe9e01b8a3 100644 (file)
@@ -396,8 +396,9 @@ openssleddsa_todns(const dst_key_t *key, isc_buffer_t *data) {
                return (ISC_R_NOSPACE);
        }
 
-       if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1)
+       if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1) {
                return (dst__openssl_toresult(ISC_R_FAILURE));
+       }
 
        isc_buffer_add(data, len);
        return (ISC_R_SUCCESS);
@@ -420,8 +421,9 @@ openssleddsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
 
        len = r.length;
        ret = raw_key_to_ossl(key->key_alg, 0, r.base, &len, &pkey);
-       if (ret != ISC_R_SUCCESS)
+       if (ret != ISC_R_SUCCESS) {
                return ret;
+       }
 
        isc_buffer_forward(data, len);
        key->keydata.pkey = pkey;
@@ -459,8 +461,9 @@ openssleddsa_tofile(const dst_key_t *key, const char *directory) {
                }
                buf = isc_mem_get(key->mctx, len);
                if (EVP_PKEY_get_raw_private_key(key->keydata.pkey, buf,
-                                                &len) != 1)
+                                                &len) != 1) {
                        DST_RET(dst__openssl_toresult(ISC_R_FAILURE));
+               }
                priv.elements[i].tag = TAG_EDDSA_PRIVATEKEY;
                priv.elements[i].length = len;
                priv.elements[i].data = buf;
index 5f950d64f3c5b14c797749585251d7ad2f3ad39b..a1a884663f46901d56b2838fa8863c881d925a7e 100644 (file)
@@ -211,6 +211,7 @@ pkcs11ecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_EC_PARAMS:
                        INSIST(keyTemplate[5].type == attr->type);
@@ -229,6 +230,7 @@ pkcs11ecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        keyTemplate[6].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -318,6 +320,7 @@ pkcs11ecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_EC_PARAMS:
                        INSIST(keyTemplate[5].type == attr->type);
@@ -336,6 +339,7 @@ pkcs11ecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                        keyTemplate[6].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -605,6 +609,7 @@ pkcs11ecdsa_destroy(dst_key_t *key) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_LABEL:
                case CKA_ID:
@@ -614,6 +619,7 @@ pkcs11ecdsa_destroy(dst_key_t *key) {
                        FREECURVE();
                        break;
                }
+       }
        if (ec->repr != NULL) {
                memset(ec->repr, 0, ec->attrcnt * sizeof(*attr));
                isc_mem_put(key->mctx, ec->repr, ec->attrcnt * sizeof(*attr));
index 9337ea886485d3e467761dff9d02cad62eb5e8b3..0c22244d5713cfa1473eb47df7a5ac734c45358a 100644 (file)
@@ -180,6 +180,7 @@ pkcs11eddsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_EC_PARAMS:
                        INSIST(keyTemplate[5].type == attr->type);
@@ -198,6 +199,7 @@ pkcs11eddsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        keyTemplate[6].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -289,6 +291,7 @@ pkcs11eddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_EC_PARAMS:
                        INSIST(keyTemplate[5].type == attr->type);
@@ -307,6 +310,7 @@ pkcs11eddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                        keyTemplate[6].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -577,6 +581,7 @@ pkcs11eddsa_destroy(dst_key_t *key) {
 
        for (attr = pk11_attribute_first(ec); attr != NULL;
             attr = pk11_attribute_next(ec, attr))
+       {
                switch (attr->type) {
                case CKA_LABEL:
                case CKA_ID:
@@ -586,6 +591,7 @@ pkcs11eddsa_destroy(dst_key_t *key) {
                        FREECURVE();
                        break;
                }
+       }
        if (ec->repr != NULL) {
                memset(ec->repr, 0, ec->attrcnt * sizeof(*attr));
                isc_mem_put(key->mctx, ec->repr, ec->attrcnt * sizeof(*attr));
index b4f8fd30eedf937b773fea5a8cbdb8cfc17685fb..69eddcf984b54e8ac515d5a8b629f6f1d9d33099 100644 (file)
@@ -140,6 +140,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
 
        for (attr = pk11_attribute_first(rsa); attr != NULL;
             attr = pk11_attribute_next(rsa, attr))
+       {
                switch (attr->type) {
                case CKA_MODULUS:
                        INSIST(keyTemplate[6].type == attr->type);
@@ -206,6 +207,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                        keyTemplate[13].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -776,6 +778,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
 
        for (attr = pk11_attribute_first(rsa); attr != NULL;
             attr = pk11_attribute_next(rsa, attr))
+       {
                switch (attr->type) {
                case CKA_MODULUS:
                        INSIST(keyTemplate[6].type == attr->type);
@@ -842,6 +845,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        keyTemplate[13].ulValueLen = attr->ulValueLen;
                        break;
                }
+       }
        pk11_ctx->object = CK_INVALID_HANDLE;
        pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
@@ -1259,6 +1263,7 @@ pkcs11rsa_destroy(dst_key_t *key) {
 
        for (attr = pk11_attribute_first(rsa); attr != NULL;
             attr = pk11_attribute_next(rsa, attr))
+       {
                switch (attr->type) {
                case CKA_LABEL:
                case CKA_ID:
@@ -1278,6 +1283,7 @@ pkcs11rsa_destroy(dst_key_t *key) {
                        }
                        break;
                }
+       }
        if (rsa->repr != NULL) {
                isc_safe_memwipe(rsa->repr, rsa->attrcnt * sizeof(*attr));
                isc_mem_put(key->mctx, rsa->repr, rsa->attrcnt * sizeof(*attr));
@@ -1301,6 +1307,7 @@ pkcs11rsa_todns(const dst_key_t *key, isc_buffer_t *data) {
 
        for (attr = pk11_attribute_first(rsa); attr != NULL;
             attr = pk11_attribute_next(rsa, attr))
+       {
                switch (attr->type) {
                case CKA_PUBLIC_EXPONENT:
                        exponent = (CK_BYTE *)attr->pValue;
@@ -1311,6 +1318,7 @@ pkcs11rsa_todns(const dst_key_t *key, isc_buffer_t *data) {
                        mod_bytes = (unsigned int)attr->ulValueLen;
                        break;
                }
+       }
        REQUIRE((exponent != NULL) && (modulus != NULL));
 
        isc_buffer_availableregion(data, &r);
@@ -1440,6 +1448,7 @@ pkcs11rsa_tofile(const dst_key_t *key, const char *directory) {
 
        for (attr = pk11_attribute_first(rsa); attr != NULL;
             attr = pk11_attribute_next(rsa, attr))
+       {
                switch (attr->type) {
                case CKA_MODULUS:
                        modulus = attr;
@@ -1466,6 +1475,7 @@ pkcs11rsa_tofile(const dst_key_t *key, const char *directory) {
                        iqmp = attr;
                        break;
                }
+       }
        if ((modulus == NULL) || (exponent == NULL)) {
                return (DST_R_NULLKEY);
        }
index ddb204618778f7cc30d4ca35721a67850c57d6d2..d5bfa1cc1758b544bafa3c4c653d3dbb77c0d0e3 100644 (file)
@@ -72,8 +72,9 @@ fromwire_gpos(ARGS_FROMWIRE) {
        UNUSED(rdclass);
        UNUSED(options);
 
-       for (i = 0; i < 3; i++)
+       for (i = 0; i < 3; i++) {
                RETERR(txt_fromwire(source, target));
+       }
        return (ISC_R_SUCCESS);
 }
 
index 476392a8ef474e5bfb885982a8f2b6be32a221d7..0726c2651a9f9e51207a4b64fb711fc6f9b23e36 100644 (file)
@@ -291,7 +291,9 @@ fromstruct_hip(ARGS_FROMSTRUCT) {
        myhip = *hip;
        for (result = dns_rdata_hip_first(&myhip); result == ISC_R_SUCCESS;
             result = dns_rdata_hip_next(&myhip))
-               /* empty */;
+       {
+               /* initialize the names */
+       }
 
        return (mem_tobuffer(target, hip->servers, hip->servers_len));
 }
index 7e3bf3959bd8bcb548fc081dd6a607af14bf3925..dda86768be91721d2a569e96e8eb37f02b7052b4 100644 (file)
@@ -1463,9 +1463,10 @@ dump_msg(struct msghdr *msg) {
        printf("\tname %p, namelen %ld\n", msg->msg_name,
               (long)msg->msg_namelen);
        printf("\tiov %p, iovlen %ld\n", msg->msg_iov, (long)msg->msg_iovlen);
-       for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
+       for (i = 0; i < (unsigned int)msg->msg_iovlen; i++) {
                printf("\t\t%u\tbase %p, len %ld\n", i,
                       msg->msg_iov[i].iov_base, (long)msg->msg_iov[i].iov_len);
+       }
        printf("\tcontrol %p, controllen %ld\n", msg->msg_control,
               (long)msg->msg_controllen);
 }
index a7d52d63517907c5352b67b58f1310e2efa1501b..2d60e0578ed35778cab805f38bd1fd2f6e08ce5b 100644 (file)
@@ -256,7 +256,9 @@ isc_dir_createunique(char *templet) {
         */
        for (x = templet + strlen(templet) - 1; *x == 'X' && x >= templet;
             x--, pid /= 10)
+       {
                *x = pid % 10 + '0';
+       }
 
        x++; /* Set x to start of ex-Xs. */
 
index 299c266a751c5fc5a2068c7ae0b44f99155cc921..6903ea2c9cf69cb5dad15774dd428505ba54e2ed 100644 (file)
@@ -387,8 +387,9 @@ internal_current6(isc_interfaceiter_t *iter) {
                snprintf(iter->current.name, sizeof(iter->current.name),
                         "TCP/IPv6 Interface %u", iter->pos6 + 1);
 
-               for (i = 0; i < 16; i++)
+               for (i = 0; i < 16; i++) {
                        iter->current.netmask.type.in6.s6_addr[i] = 0xff;
+               }
                iter->current.netmask.family = AF_INET6;
                if (IN6_IS_ADDR_LOOPBACK(&iter->current.address.type.in6)) {
                        iter->v6loop = true;
index 41bdd7915652d3607d842598dfbd9f89a4d1615f..15018d3e76a3be3170162eb59510fd5cd0452f35 100644 (file)
@@ -1028,9 +1028,10 @@ dump_msg(struct msghdr *msg, isc_socket_t *sock) {
        printf("MSGHDR %p, Socket #: %Iu\n", msg, sock->fd);
        printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen);
        printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen);
-       for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
+       for (i = 0; i < (unsigned int)msg->msg_iovlen; i++) {
                printf("\t\t%u\tbase %p, len %u\n", i, msg->msg_iov[i].buf,
                       msg->msg_iov[i].len);
+       }
 }
 #endif /* if defined(ISC_SOCKET_DEBUG) */