diff options
Diffstat (limited to 'lib/ldb/common/ldb_dn.c')
-rw-r--r-- | lib/ldb/common/ldb_dn.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index 377dd74d9f3..b9a414dc566 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -298,7 +298,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) char *parse_dn; bool is_index; - if (dn == NULL || dn->invalid) { + if (dn == NULL || dn->invalid == true) { return false; } @@ -324,7 +324,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) } /* Special DNs case */ - if (dn->special) { + if (dn->special == true) { return true; } @@ -350,7 +350,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) d = dt = data; while (*p) { - if (in_extended) { + if (in_extended == true) { if (!in_ex_name && !in_ex_value) { @@ -437,8 +437,8 @@ static bool ldb_dn_explode(struct ldb_dn *dn) *d++ = *p++; continue; } - if (in_attr) { - if (trim) { + if (in_attr == true) { + if (trim == true) { if (*p == ' ') { p++; continue; @@ -505,7 +505,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) goto failed; } - if (is_oid && ( ! (isdigit(*p) || (*p == '.')))) { + if (is_oid == true && ( ! (isdigit(*p) || (*p == '.')))) { /* not a digit nor a dot, * invalid attribute oid */ ldb_dn_mark_invalid(dn); @@ -521,8 +521,8 @@ static bool ldb_dn_explode(struct ldb_dn *dn) continue; } - if (in_value) { - if (in_quote) { + if (in_value == true) { + if (in_quote == true) { if (*p == '\"') { if (p[-1] != '\\') { p++; @@ -535,7 +535,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) continue; } - if (trim) { + if (trim == true) { if (*p == ' ') { p++; continue; @@ -558,7 +558,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) */ case ',': - if (escape) { + if (escape == true) { *d++ = *p++; l++; escape = false; @@ -619,7 +619,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) accept the base64 encoded binary index values, which contain a '+' or '=' which should normally be escaped */ - if (is_index) { + if (is_index == true) { if (t != NULL) { t = NULL; } @@ -634,7 +634,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) case '>': case ';': /* a string with not escaped specials is invalid (tested) */ - if ( ! escape) { + if (escape == false) { ldb_dn_mark_invalid(dn); goto failed; } @@ -649,7 +649,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) break; case '\\': - if ( ! escape) { + if (escape == false) { escape = true; p++; continue; @@ -665,7 +665,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn) break; default: - if (escape) { + if (escape == true) { if (isxdigit(p[0]) && isxdigit(p[1])) { if (sscanf(p, "%02x", &x) != 1) { /* invalid escaping sequence */ @@ -705,13 +705,13 @@ static bool ldb_dn_explode(struct ldb_dn *dn) } } - if (in_attr || in_quote) { + if (in_attr == true || in_quote == true) { /* invalid dn */ ldb_dn_mark_invalid(dn); goto failed; } - if (in_value) { + if (in_value == true) { /* save last element */ if (t != NULL) { /* trim back */ |