From 1b0f3b7e3a3eadb1c9997b38dd41aa4c09c41a46 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 24 Sep 2009 15:01:32 +0200 Subject: s3-registry: use regval_ctr_addvalue_sz(). Greatly simplifies and cleanes up the code. Guenther --- source3/registry/reg_eventlog.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'source3/registry/reg_eventlog.c') diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c index c0d5b95b0b..4d395eddb1 100644 --- a/source3/registry/reg_eventlog.c +++ b/source3/registry/reg_eventlog.c @@ -114,11 +114,8 @@ bool eventlog_init_keys(void) regval_ctr_addvalue(values, "Retention", REG_DWORD, (char *)&uiRetention, sizeof(uint32)); - push_reg_sz(talloc_tos(), &data, *elogs); - regval_ctr_addvalue(values, "PrimaryModule", REG_SZ, - (char *)data.data, - data.length); + regval_ctr_addvalue_sz(values, "PrimaryModule", *elogs); push_reg_sz(talloc_tos(), &data, *elogs); regval_ctr_addvalue(values, "Sources", REG_MULTI_SZ, @@ -199,7 +196,6 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename, struct regsubkey_ctr *subkeys; struct regval_ctr *values; struct regval_blob *rval; - DATA_BLOB data; uint16 *msz_wp; int mbytes, ii; bool already_in; @@ -369,11 +365,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename, regdb_fetch_values( evtlogpath, values ); - push_reg_sz(talloc_tos(), &data, messagefile); - - regval_ctr_addvalue( values, "EventMessageFile", REG_SZ, - ( char * ) data.data, - data.length); + regval_ctr_addvalue_sz(values, "EventMessageFile", messagefile); regdb_store_values( evtlogpath, values ); TALLOC_FREE(values); -- cgit