From e38fad186f3dd0977f8601b3adf57a3008bfb9b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 11 Feb 2007 17:36:33 +0000 Subject: r21281: move constinancy checks to the beginning of the function metze (This used to be commit f2af44d20484e57495ab0ebd5aab993e4af43fd4) --- source4/dsdb/repl/replicated_objects.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/dsdb/repl') diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c index 9a9fd40d4b..9f6ce4c519 100644 --- a/source4/dsdb/repl/replicated_objects.c +++ b/source4/dsdb/repl/replicated_objects.c @@ -61,6 +61,14 @@ static WERROR dsdb_convert_object(struct ldb_context *ldb, return WERR_FOOBAR; } + if (in->object.attribute_ctr.num_attributes != 0 && !in->meta_data_ctr) { + return WERR_FOOBAR; + } + + if (in->object.attribute_ctr.num_attributes != in->meta_data_ctr->count) { + return WERR_FOOBAR; + } + msg = ldb_msg_new(mem_ctx); W_ERROR_HAVE_NO_MEMORY(msg); @@ -87,14 +95,6 @@ static WERROR dsdb_convert_object(struct ldb_context *ldb, W_ERROR_NOT_OK_RETURN(status); } - if (in->object.attribute_ctr.num_attributes != 0 && !in->meta_data_ctr) { - return WERR_FOOBAR; - } - - if (in->object.attribute_ctr.num_attributes != in->meta_data_ctr->count) { - return WERR_FOOBAR; - } - md = talloc(mem_ctx, struct replPropertyMetaDataBlob); W_ERROR_HAVE_NO_MEMORY(md); -- cgit