2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove redundant parentheses from the return statement

This commit is contained in:
Ondřej Surý
2024-11-19 10:38:03 +01:00
parent 3873b0c279
commit 0258850f20
437 changed files with 10832 additions and 10856 deletions

View File

@@ -80,7 +80,7 @@ isc_hex_totext(isc_region_t *source, int wordlength, const char *wordbreak,
RETERR(str_totext(wordbreak, target));
}
}
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
/*%
@@ -106,7 +106,7 @@ hex_decode_char(hex_decode_ctx_t *ctx, int c) {
hexval = isc_hex_char(c);
if (hexval == 0) {
return (ISC_R_BADHEX);
return ISC_R_BADHEX;
}
ctx->val[ctx->digits++] = c - hexval;
if (ctx->digits == 2) {
@@ -116,25 +116,25 @@ hex_decode_char(hex_decode_ctx_t *ctx, int c) {
RETERR(mem_tobuffer(ctx->target, &num, 1));
if (ctx->length >= 0) {
if (ctx->length == 0) {
return (ISC_R_BADHEX);
return ISC_R_BADHEX;
} else {
ctx->length -= 1;
}
}
ctx->digits = 0;
}
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
static isc_result_t
hex_decode_finish(hex_decode_ctx_t *ctx) {
if (ctx->length > 0) {
return (ISC_R_UNEXPECTEDEND);
return ISC_R_UNEXPECTEDEND;
}
if (ctx->digits != 0) {
return (ISC_R_BADHEX);
return ISC_R_BADHEX;
}
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
isc_result_t
@@ -174,9 +174,9 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
}
RETERR(hex_decode_finish(&ctx));
if (length == -2 && before == after) {
return (ISC_R_UNEXPECTEDEND);
return ISC_R_UNEXPECTEDEND;
}
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
isc_result_t
@@ -195,7 +195,7 @@ isc_hex_decodestring(const char *cstr, isc_buffer_t *target) {
RETERR(hex_decode_char(&ctx, c));
}
RETERR(hex_decode_finish(&ctx));
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
static isc_result_t
@@ -207,12 +207,12 @@ str_totext(const char *source, isc_buffer_t *target) {
l = strlen(source);
if (l > region.length) {
return (ISC_R_NOSPACE);
return ISC_R_NOSPACE;
}
memmove(region.base, source, l);
isc_buffer_add(target, l);
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}
static isc_result_t
@@ -221,9 +221,9 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
isc_buffer_availableregion(target, &tr);
if (length > tr.length) {
return (ISC_R_NOSPACE);
return ISC_R_NOSPACE;
}
memmove(tr.base, base, length);
isc_buffer_add(target, length);
return (ISC_R_SUCCESS);
return ISC_R_SUCCESS;
}