diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-23 13:34:52 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-23 13:34:52 +0000 |
commit | 0695dce904b99103b4cc7fec55d7413358ac120d (patch) | |
tree | f6995bddf31b3aab28d430274a64849f9e1a49ec /usr.bin/dig/lib | |
parent | 4f8231b24973fc14e0973e84cca023b7a139b478 (diff) |
correct indentation; no functional change
ok tb@
Diffstat (limited to 'usr.bin/dig/lib')
-rw-r--r-- | usr.bin/dig/lib/dns/rdata.c | 33 | ||||
-rw-r--r-- | usr.bin/dig/lib/dns/rdata/generic/tkey_249.c | 18 | ||||
-rw-r--r-- | usr.bin/dig/lib/dns/tsig.c | 22 |
3 files changed, 36 insertions, 37 deletions
diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c index acd7caa50db..395f3cf1262 100644 --- a/usr.bin/dig/lib/dns/rdata.c +++ b/usr.bin/dig/lib/dns/rdata.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.35 2022/07/03 12:07:52 florian Exp $ */ +/* $Id: rdata.c,v 1.36 2024/04/23 13:34:50 jsg Exp $ */ /*! \file */ @@ -1430,25 +1430,24 @@ byte_btoa(int c, isc_buffer_t *target, struct state *state) { tr.base[0] = 'z'; isc_buffer_add(target, 1); } else { - register int tmp = 0; - register int32_t tmpword = word; - - if (tmpword < 0) { - /* - * Because some don't support u_long. - */ - tmp = 32; - tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); - } - if (tmpword < 0) { - tmp = 64; - tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); - } + register int tmp = 0; + register int32_t tmpword = word; + + if (tmpword < 0) { + /* + * Because some don't support u_long. + */ + tmp = 32; + tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); + } + if (tmpword < 0) { + tmp = 64; + tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); + } if (tr.length < 5) return (ISC_R_NOSPACE); tr.base[0] = atob_digits[(tmpword / - (int32_t)(85 * 85 * 85 * 85)) - + tmp]; + (int32_t)(85 * 85 * 85 * 85)) + tmp]; tmpword %= (int32_t)(85 * 85 * 85 * 85); tr.base[1] = atob_digits[tmpword / (85 * 85 * 85)]; tmpword %= (85 * 85 * 85); diff --git a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c index 97fab1f5f0d..b8fb9e8ddd5 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c +++ b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tkey_249.c,v 1.13 2020/09/14 08:40:43 florian Exp $ */ +/* $Id: tkey_249.c,v 1.14 2024/04/23 13:34:50 jsg Exp $ */ /* * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. @@ -127,18 +127,18 @@ totext_tkey(ARGS_TOTEXT) { */ REQUIRE(n <= sr.length); if (n != 0U) { - dr = sr; - dr.length = n; - if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) - RETERR(isc_str_tobuffer(" (", target)); - RETERR(isc_str_tobuffer(tctx->linebreak, target)); + dr = sr; + dr.length = n; + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(isc_str_tobuffer(" (", target)); + RETERR(isc_str_tobuffer(tctx->linebreak, target)); if (tctx->width == 0) /* No splitting */ RETERR(isc_base64_totext(&dr, 60, "", target)); else RETERR(isc_base64_totext(&dr, tctx->width - 2, - tctx->linebreak, target)); - if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) - RETERR(isc_str_tobuffer(" )", target)); + tctx->linebreak, target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(isc_str_tobuffer(" )", target)); } return (ISC_R_SUCCESS); } diff --git a/usr.bin/dig/lib/dns/tsig.c b/usr.bin/dig/lib/dns/tsig.c index 795944c0647..57658a91b45 100644 --- a/usr.bin/dig/lib/dns/tsig.c +++ b/usr.bin/dig/lib/dns/tsig.c @@ -15,7 +15,7 @@ */ /* - * $Id: tsig.c,v 1.14 2020/09/14 08:40:43 florian Exp $ + * $Id: tsig.c,v 1.15 2024/04/23 13:34:50 jsg Exp $ */ /*! \file */ @@ -295,8 +295,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA224_NAME)) { if (secret != NULL) { @@ -308,8 +308,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA256_NAME)) { if (secret != NULL) { @@ -321,8 +321,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA384_NAME)) { if (secret != NULL) { @@ -334,8 +334,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA512_NAME)) { if (secret != NULL) { @@ -347,8 +347,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (length > 0) return (DNS_R_BADALG); |