This doesn't need a wrapper function. It gets in the way if building
a value involves allocating memory (e.g. talloc_asprintf()) and then
ctdb_set_notification_script() duplicates that memory.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
}
if (options.notification_script != NULL) {
- ret = ctdb_set_notification_script(ctdb, options.notification_script);
- if (ret == -1) {
- DEBUG(DEBUG_ERR,("Unable to setup notification script\n"));
+ ctdb->notification_script = talloc_strdup(
+ ctdb, options.notification_script);
+ if (ctdb->notification_script == NULL) {
+ D_ERR("Unable to set notification script\n");
exit(1);
}
}