summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-03-13 14:16:17 +0000
committerMichael Adam <obnox@samba.org>2015-03-13 16:39:05 +0100
commit8d9bb5c54aae0099e0dde2d9a904676fcb9340c0 (patch)
treecdaaee33a1e5824d17df2097df2f672191994fb2
parentc1e8bfb186c5cbeafbce9f2767db82edb579d5e1 (diff)
downloadsamba-8d9bb5c54aae0099e0dde2d9a904676fcb9340c0.tar.gz
ctdb: Introduce a helper var in ctdb_get_script_list
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--ctdb/server/eventscript.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c
index a47396a8ad9..b51d95350db 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -182,11 +182,13 @@ static struct ctdb_scripts_wire *ctdb_get_script_list(struct ctdb_context *ctdb,
scripts->num_scripts = count;
for (i = 0; i < count; i++) {
- strcpy(scripts->scripts[i].name, namelist[i]->d_name);
- scripts->scripts[i].status = 0;
+ struct ctdb_script_wire *s = &scripts->scripts[i];
+
+ strcpy(s->name, namelist[i]->d_name);
+ s->status = 0;
if (!check_executable(ctdb->event_script_dir,
namelist[i]->d_name)) {
- scripts->scripts[i].status = -errno;
+ s->status = -errno;
}
}