s4: Use same function signature for convert_* as s3.
[bbaumbach/samba-autobuild/.git] / source4 / lib / registry / tests / generic.c
index 3a3c3e77474db5ff773f317529a0a0337e337bf4..3de7602e53f989972f0da39ddae0ddaff68c808b 100644 (file)
@@ -53,8 +53,8 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx)
 static bool test_reg_val_data_string_sz(struct torture_context *ctx)
 {
        DATA_BLOB db;
-       db.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
-                                         "bla", 3, (void **)&db.data, false);
+       convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+                                         "bla", 3, (void **)&db.data, &db.length, false);
        torture_assert_str_equal(ctx, "bla",
                                 reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_SZ, db),
                                 "sz failed");
@@ -88,10 +88,10 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx)
 static bool test_reg_val_description(struct torture_context *ctx)
 {
        DATA_BLOB data;
-       data.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+       convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
                                            "stationary traveller",
                                            strlen("stationary traveller"),
-                                           (void **)&data.data, false);
+                                           (void **)&data.data, &data.length, false);
        torture_assert_str_equal(ctx, "camel = REG_SZ : stationary traveller",
                                 reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), "camel", REG_SZ, data),
                                 "reg_val_description failed");
@@ -102,10 +102,10 @@ static bool test_reg_val_description(struct torture_context *ctx)
 static bool test_reg_val_description_nullname(struct torture_context *ctx)
 {
        DATA_BLOB data;
-       data.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+       convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
                                            "west berlin",
                                            strlen("west berlin"),
-                                           (void **)&data.data, false);
+                                           (void **)&data.data, &data.length, false);
        torture_assert_str_equal(ctx, "<No Name> = REG_SZ : west berlin",
                                 reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), NULL, REG_SZ, data),
                                 "description with null name failed");