s4:dsdb: Remove unnecessary casts
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 9 Aug 2023 04:54:24 +0000 (16:54 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Aug 2023 04:57:34 +0000 (04:57 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/schema/schema_syntax.c

index 7734cca0832bed8a8bead379714b3741919aab48..f065758d50f9d689831b7320c71b0c0e10fb6f53 100644 (file)
@@ -2536,7 +2536,7 @@ static int setup_given_passwords(struct setup_password_fields_io *io,
                                           CH_UTF8, CH_UTF16,
                                           g->cleartext_utf8->data,
                                           g->cleartext_utf8->length,
-                                          (void *)&cleartext_utf16_blob->data,
+                                          &cleartext_utf16_blob->data,
                                           &cleartext_utf16_blob->length)) {
                        if (g->cleartext_utf8->length != 0) {
                                talloc_free(cleartext_utf16_blob);
@@ -2563,7 +2563,7 @@ static int setup_given_passwords(struct setup_password_fields_io *io,
                                           CH_UTF16MUNGED, CH_UTF8,
                                           g->cleartext_utf16->data,
                                           g->cleartext_utf16->length,
-                                          (void *)&cleartext_utf8_blob->data,
+                                          &cleartext_utf8_blob->data,
                                           &cleartext_utf8_blob->length)) {
                        if (g->cleartext_utf16->length != 0) {
                                /* We must bail out here, the input wasn't even
index b3df10a0217eb6ff0cacf123fb5ae886ee510ed6..3bcf80dcd807b37d561e091e0d26d8bb70aeba63 100644 (file)
@@ -1535,7 +1535,7 @@ static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(const struct dsdb_syntax_ctx *c
                                           CH_UTF16, CH_UNIX,
                                           in->value_ctr.values[i].blob->data,
                                           in->value_ctr.values[i].blob->length,
-                                          (void **)&str, &converted_size)) {
+                                          &str, &converted_size)) {
                        return WERR_FOOBAR;
                }
 
@@ -1575,7 +1575,7 @@ static WERROR dsdb_syntax_UNICODE_ldb_to_drsuapi(const struct dsdb_syntax_ctx *c
                if (!convert_string_talloc(blobs,
                                           CH_UNIX, CH_UTF16,
                                           in->values[i].data, in->values[i].length,
-                                          (void **)&blobs[i].data, &blobs[i].length)) {
+                                          &blobs[i].data, &blobs[i].length)) {
                        return WERR_FOOBAR;
                }
        }
@@ -1599,7 +1599,7 @@ static WERROR dsdb_syntax_UNICODE_validate_one_val(const struct dsdb_syntax_ctx
                                   CH_UNIX, CH_UTF16,
                                   val->data,
                                   val->length,
-                                  (void **)&dst,
+                                  &dst,
                                   &size);
        TALLOC_FREE(dst);
        if (!ok) {