From: Volker Lendecke Date: Thu, 14 Nov 2024 19:52:03 +0000 (+0100) Subject: libcli: Simplify debug_conditional_ace() X-Git-Tag: tdb-1.4.13~504 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f29caf599d2c657641c2e775c0dcb9db5f69919;p=thirdparty%2Fsamba.git libcli: Simplify debug_conditional_ace() Move a variable declaration to its only user Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/libcli/security/sddl_conditional_ace.c b/libcli/security/sddl_conditional_ace.c index cd39e3c4c50..62323a300a0 100644 --- a/libcli/security/sddl_conditional_ace.c +++ b/libcli/security/sddl_conditional_ace.c @@ -445,7 +445,6 @@ char *debug_conditional_ace(TALLOC_CTX *mem_ctx, for (i = 0; i < program->length; i++) { struct ace_condition_token *tok = &program->tokens[i]; struct sddl_data s = sddl_strings[tok->type]; - char hex[21]; char *utf8 = NULL; int utf8_len; char type; @@ -535,7 +534,8 @@ char *debug_conditional_ace(TALLOC_CTX *mem_ctx, type = 'u'; break; - case CONDITIONAL_ACE_TOKEN_OCTET_STRING: + case CONDITIONAL_ACE_TOKEN_OCTET_STRING: { + char hex[21]; utf8_len = MIN(tok->data.bytes.length, 9); hex_encode_buf(hex, tok->data.bytes.data, utf8_len); @@ -544,6 +544,7 @@ char *debug_conditional_ace(TALLOC_CTX *mem_ctx, nom, utf8_len * 2, hex, utf8_len); type = 'o'; break; + } case CONDITIONAL_ACE_TOKEN_SID: utf8 = sddl_encode_sid(mem_ctx, &tok->data.sid.sid,