summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-11 17:36:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:44:58 -0500
commite38fad186f3dd0977f8601b3adf57a3008bfb9b9 (patch)
treec79f1ba686da2cfe466c10a1163edb83c3ea0ad4
parentf089de886fa120f5b7619daf0c0d85a0b4100973 (diff)
downloadsamba-e38fad186f3dd0977f8601b3adf57a3008bfb9b9.tar.gz
samba-e38fad186f3dd0977f8601b3adf57a3008bfb9b9.tar.bz2
samba-e38fad186f3dd0977f8601b3adf57a3008bfb9b9.zip
r21281: move constinancy checks to the beginning of the function
metze (This used to be commit f2af44d20484e57495ab0ebd5aab993e4af43fd4)
-rw-r--r--source4/dsdb/repl/replicated_objects.c16
1 files changed, 8 insertions, 8 deletions
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);