aboutsummaryrefslogtreecommitdiff
path: root/crypto/punycode.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/punycode.c')
-rw-r--r--crypto/punycode.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/crypto/punycode.c b/crypto/punycode.c
index 2de32dc18873..fcd488431f82 100644
--- a/crypto/punycode.c
+++ b/crypto/punycode.c
@@ -41,7 +41,7 @@ static const char delimiter = '-';
*/
static int adapt(unsigned int delta, unsigned int numpoints,
- unsigned int firsttime)
+ unsigned int firsttime)
{
unsigned int k = 0;
@@ -116,7 +116,7 @@ static ossl_inline int digit_decoded(const unsigned char a)
*/
int ossl_punycode_decode(const char *pEncoded, const size_t enc_len,
- unsigned int *pDecoded, unsigned int *pout_length)
+ unsigned int *pDecoded, unsigned int *pout_length)
{
unsigned int n = initial_n;
unsigned int i = 0;
@@ -164,7 +164,8 @@ int ossl_punycode_decode(const char *pEncoded, const size_t enc_len,
return 0;
i = i + digit * w;
- t = (k <= bias) ? tmin : (k >= bias + tmax) ? tmax : k - bias;
+ t = (k <= bias) ? tmin : (k >= bias + tmax) ? tmax
+ : k - bias;
if ((unsigned int)digit < t)
break;
@@ -184,7 +185,7 @@ int ossl_punycode_decode(const char *pEncoded, const size_t enc_len,
return 0;
memmove(pDecoded + i + 1, pDecoded + i,
- (written_out - i) * sizeof(*pDecoded));
+ (written_out - i) * sizeof(*pDecoded));
pDecoded[i] = n;
i++;
written_out++;
@@ -257,7 +258,7 @@ int ossl_a2ulabel(const char *in, char *out, size_t *outlen)
size_t size = 0, maxsize;
int result = 1;
unsigned int i, j;
- unsigned int buf[LABEL_BUF_SIZE]; /* It's a hostname */
+ unsigned int buf[LABEL_BUF_SIZE]; /* It's a hostname */
if (out == NULL) {
result = 0;
@@ -266,12 +267,12 @@ int ossl_a2ulabel(const char *in, char *out, size_t *outlen)
maxsize = *outlen;
}
-#define PUSHC(c) \
- do \
- if (size++ < maxsize) \
- *outptr++ = c; \
- else \
- result = 0; \
+#define PUSHC(c) \
+ do \
+ if (size++ < maxsize) \
+ *outptr++ = c; \
+ else \
+ result = 0; \
while (0)
while (1) {