From c7a60a178f4b28f40d70f7b0c12bec6ab7af7846 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 13 Apr 2004 17:34:37 +0000 Subject: r200: fix compile errors (This used to be commit c64132ddc6396a599a2e13b893e8abf1f731478f) --- source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c | 3 ++- source4/lib/registry/reg_backend_w95/reg_backend_w95.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c index 74d7bbd3b1..9a3005457e 100644 --- a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c +++ b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c @@ -1575,11 +1575,12 @@ static WERROR nt_close_registry (REG_HANDLE *h) static WERROR nt_open_registry (REG_HANDLE *h, const char *location, const char *credentials) { - REGF *regf = (REGF *)talloc_p(h->mem_ctx, REGF); + REGF *regf; REGF_HDR *regf_hdr; unsigned int regf_id, hbin_id; HBIN_HDR *hbin_hdr; + regf = (REGF *)talloc_p(h->mem_ctx, REGF); memset(regf, 0, sizeof(REGF)); regf->owner_sid_str = credentials; h->backend_data = regf; diff --git a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c index 31abd69854..cd07e0a179 100644 --- a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c +++ b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c @@ -224,13 +224,15 @@ static WERROR w95_get_subkey_by_index (REG_KEY *parent, int n, REG_KEY **key) static WERROR w95_open_reg (REG_HANDLE *h, const char *location, const char *credentials) { - CREG *creg = talloc_p(h->mem_ctx, CREG); + CREG *creg; DWORD creg_id, rgkn_id; - memset(creg, 0, sizeof(CREG)); - h->backend_data = creg; DWORD i, nfree = 0; DWORD offset, end_offset; + creg = talloc_p(h->mem_ctx, CREG); + memset(creg, 0, sizeof(CREG)); + h->backend_data = creg; + if((creg->fd = open(location, O_RDONLY, 0000)) < 0) { return WERR_FOOBAR; } -- cgit