From e22c4b641ac8d70a38d53f0e5feec6cf6b6278f7 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Wed, 1 Aug 2018 20:23:48 +0000 Subject: [PATCH] ITS#8890 fix benign typos No functional impact --- clients/tools/common.c | 2 +- servers/slapd/backend.c | 2 +- servers/slapd/overlays/constraint.c | 2 +- servers/slapd/syntax.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/tools/common.c b/clients/tools/common.c index 3592e6fabc..5cefc54e3d 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -2327,7 +2327,7 @@ void tool_print_ctrls( /* known controls */ for ( j = 0; tool_ctrl_response[j].oid != NULL; j++ ) { if ( strcmp( tool_ctrl_response[j].oid, ctrls[i]->ldctl_oid ) == 0 ) { - if ( !tool_ctrl_response[j].mask & tool_type ) { + if ( !(tool_ctrl_response[j].mask & tool_type )) { /* this control should not appear * with this tool; warning? */ } diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index e7a6f3b902..94bffaa601 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1500,7 +1500,7 @@ fe_acl_group( * or if filter parsing fails. * In the latter case, * we should give up. */ - if ( ludp->lud_filter != NULL && ludp->lud_filter != '\0') { + if ( ludp->lud_filter != NULL && *ludp->lud_filter != '\0') { filter = str2filter_x( op, ludp->lud_filter ); if ( filter == NULL ) { /* give up... */ diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c index 5c65b42dc9..ccc942f8df 100644 --- a/servers/slapd/overlays/constraint.c +++ b/servers/slapd/overlays/constraint.c @@ -446,7 +446,7 @@ constraint_cf_gen( ConfigArgs *c ) } if ( ap.restrict_lud->lud_attrs != NULL ) { - if ( ap.restrict_lud->lud_attrs[0] != '\0' ) { + if ( ap.restrict_lud->lud_attrs[0] != NULL ) { snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s %s: attrs not allowed in restrict URI %s\n", c->argv[0], c->argv[1], arg); diff --git a/servers/slapd/syntax.c b/servers/slapd/syntax.c index 30cc81fb9b..afa9f36041 100644 --- a/servers/slapd/syntax.c +++ b/servers/slapd/syntax.c @@ -219,8 +219,8 @@ syn_add( } assert( (*lsei)->lsei_values != NULL ); - if ( (*lsei)->lsei_values[0] == '\0' - || (*lsei)->lsei_values[1] != '\0' ) + if ( (*lsei)->lsei_values[0] == NULL + || (*lsei)->lsei_values[1] != NULL ) { Debug( LDAP_DEBUG_ANY, "syn_add(%s): exactly one substitute syntax must be present\n", ssyn->ssyn_syn.syn_oid, 0, 0 ); -- 2.47.2