From: Volker Lendecke Date: Mon, 12 Sep 2022 17:17:09 +0000 (-0700) Subject: registry3: Move registry_value_cmp() to its only user X-Git-Tag: talloc-2.4.0~937 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f41c7ea8a27fa49e3d5d5446ced5123aedd58d0e;p=thirdparty%2Fsamba.git registry3: Move registry_value_cmp() to its only user Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/registry/reg_api_util.c b/source3/registry/reg_api_util.c index a2c84c0251a..2eca74ead93 100644 --- a/source3/registry/reg_api_util.c +++ b/source3/registry/reg_api_util.c @@ -82,11 +82,3 @@ WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path, *pkey = key; return WERR_OK; } - -int registry_value_cmp(const struct registry_value* v1, const struct registry_value* v2) -{ - if (v1->type == v2->type) { - return data_blob_cmp(&v1->data, &v2->data); - } - return v1->type - v2->type; -} diff --git a/source3/registry/reg_api_util.h b/source3/registry/reg_api_util.h index cf003273043..67c77a00073 100644 --- a/source3/registry/reg_api_util.h +++ b/source3/registry/reg_api_util.h @@ -32,6 +32,4 @@ WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path, uint32_t desired_access, const struct security_token *token, struct registry_key **pkey); -int registry_value_cmp(const struct registry_value *v1, const struct registry_value *v2); - #endif /* _REG_API_UTIL_H */ diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 389e3f6a552..23e1dc0adbd 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -1135,6 +1135,15 @@ done: return werr; } +static int registry_value_cmp( + const struct registry_value* v1, const struct registry_value* v2) +{ + if (v1->type == v2->type) { + return data_blob_cmp(&v1->data, &v2->data); + } + return v1->type - v2->type; +} + static WERROR precheck_create_val(struct precheck_ctx *ctx, struct registry_key *parent, const char *name,