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

Replace custom isc_boolean_t with C standard bool type

This commit is contained in:
Ondřej Surý
2018-04-17 08:29:14 -07:00
parent cb6a185c69
commit 994e656977
546 changed files with 10785 additions and 10367 deletions

View File

@@ -14,6 +14,8 @@
#include <config.h>
#include <stdbool.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/lex.h>
@@ -96,7 +98,7 @@ typedef struct {
int length; /*%< Desired length of binary data or -1 */
isc_buffer_t *target; /*%< Buffer for resulting binary data */
int digits; /*%< Number of buffered base64 digits */
isc_boolean_t seen_end; /*%< True if "=" end marker seen */
bool seen_end; /*%< True if "=" end marker seen */
int val[4];
} base64_decode_ctx_t;
@@ -104,7 +106,7 @@ static inline void
base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target)
{
ctx->digits = 0;
ctx->seen_end = ISC_FALSE;
ctx->seen_end = false;
ctx->length = length;
ctx->target = target;
}
@@ -139,7 +141,7 @@ base64_decode_char(base64_decode_ctx_t *ctx, int c) {
n = (ctx->val[2] == 64) ? 1 :
(ctx->val[3] == 64) ? 2 : 3;
if (n != 3) {
ctx->seen_end = ISC_TRUE;
ctx->seen_end = true;
if (ctx->val[2] == 64)
ctx->val[2] = 0;
if (ctx->val[3] == 64)
@@ -174,7 +176,7 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
base64_decode_ctx_t ctx;
isc_textregion_t *tr;
isc_token_t token;
isc_boolean_t eol;
bool eol;
base64_decode_init(&ctx, length, target);
@@ -182,9 +184,9 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
unsigned int i;
if (length > 0)
eol = ISC_FALSE;
eol = false;
else
eol = ISC_TRUE;
eol = true;
RETERR(isc_lex_getmastertoken(lexer, &token,
isc_tokentype_string, eol));
if (token.type != isc_tokentype_string)