{
unsigned int i;
struct ldb_message *msg;
- int ret = 0;
+ int ret;
unsigned int adds=0, modifies=0, deletes=0;
struct ldb_control **req_ctrls = ldb_parse_control_strings(ldb, ldb, (const char **)options->controls);
if (options->controls != NULL && req_ctrls == NULL) {
}
adds++;
} else {
- if (modify_record(ldb, msg, msgs2[i], req_ctrls) > 0) {
- modifies++;
+ ret = modify_record(ldb, msg, msgs2[i], req_ctrls);
+ if (ret != -1) {
+ modifies += (unsigned int) ret;
+ } else {
+ return -1;
}
}
}
printf("# %u adds %u modifies %u deletes\n", adds, modifies, deletes);
- return ret;
+ return 0;
}
/*