From 0f531e3a2a94594ad5a68bbf8bae85555b8f644e Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Thu, 29 Oct 2009 18:18:54 +0200 Subject: s4/drs: Refactor to be more SAMBA.Coding style compliant Signed-off-by: Stefan Metzmacher --- source4/dsdb/schema/schema_init.c | 3 ++- source4/dsdb/schema/schema_prefixmap.c | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 262ac098df..de370e0b23 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -174,7 +174,8 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema, pfm.reserved = 0; pfm.ctr.dsdb = *ctr; - ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, schema->iconv_convenience, &pfm, (ndr_push_flags_fn_t)ndr_push_prefixMapBlob); + ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, schema->iconv_convenience, &pfm, + (ndr_push_flags_fn_t)ndr_push_prefixMapBlob); talloc_free(ctr); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c index acdb034a9b..969b357a39 100644 --- a/source4/dsdb/schema/schema_prefixmap.c +++ b/source4/dsdb/schema/schema_prefixmap.c @@ -120,9 +120,7 @@ static WERROR _dsdb_schema_pfm_add_entry(struct dsdb_schema_prefixmap *pfm, DATA /* dup memory for bin-oid prefix to be added */ bin_oid = data_blob_dup_talloc(pfm, &bin_oid); - if (!bin_oid.data) { - return WERR_NOMEM; - } + W_ERROR_HAVE_NO_MEMORY(bin_oid.data); /* make room for new entry */ prefixes_new = talloc_realloc(pfm, pfm->prefixes, struct dsdb_schema_prefixmap_oid, pfm->length + 1); -- cgit