From ad836c4d48e7c7a8a6f1d240f20cca730487a651 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 30 Sep 2009 20:00:52 +0200 Subject: s3-registry: use pull_reg_sz() where appropriate. (and move away from rpcstr_pull and rpcstr_pull_talloc). Guenther --- source3/registry/reg_objects.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/registry/reg_objects.c') diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 21ebba6540..b4b8ff2630 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -602,11 +602,12 @@ uint32 regval_dword(struct regval_blob *val) return the data_p as a character string **********************************************************************/ -char *regval_sz(struct regval_blob *val) +const char *regval_sz(struct regval_blob *val) { - char *data = NULL; + const char *data = NULL; + DATA_BLOB blob = data_blob_const(regval_data_p(val), regval_size(val)); + + pull_reg_sz(talloc_tos(), &blob, &data); - rpcstr_pull_talloc(talloc_tos(), &data, - regval_data_p(val), regval_size(val),0); return data; } -- cgit