[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Wed Mar 29 09:08:03 UTC 2017
The branch, master has been updated
via 6e9879f ctdb-tools: Avoid deferencing argv[0] if argc == 0
from 12cd7ab WHATSNEW: Add entry for auth audit
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6e9879f6e2f8974730517fad22875db06f0738de
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Mar 7 14:13:10 2017 +1100
ctdb-tools: Avoid deferencing argv[0] if argc == 0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12723
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Wed Mar 29 11:07:18 CEST 2017 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
ctdb/tools/ctdb_event.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tools/ctdb_event.c b/ctdb/tools/ctdb_event.c
index 62b4b91..8e2dca7 100644
--- a/ctdb/tools/ctdb_event.c
+++ b/ctdb/tools/ctdb_event.c
@@ -223,23 +223,26 @@ static int command_status(TALLOC_CTX *mem_ctx, struct tool_context *tctx,
talloc_free(req);
if (! status) {
fprintf(stderr, "Failed to get event %s status, ret=%d\n",
- argv[0], ret);
+ ctdb_event_to_string(event), ret);
return ret;
}
if (result != 0) {
fprintf(stderr, "Failed to get event %s status, result=%d\n",
- argv[0], result);
+ ctdb_event_to_string(event), result);
return result;
}
if (script_list == NULL) {
if (state == CTDB_EVENT_LAST_RUN) {
- printf("Event %s has never run\n", argv[0]);
+ printf("Event %s has never run\n",
+ ctdb_event_to_string(event));
} else if (state == CTDB_EVENT_LAST_PASS) {
- printf("Event %s has never passed\n", argv[0]);
+ printf("Event %s has never passed\n",
+ ctdb_event_to_string(event));
} else if (state == CTDB_EVENT_LAST_FAIL) {
- printf("Event %s has never failed\n", argv[0]);
+ printf("Event %s has never failed\n",
+ ctdb_event_to_string(event));
}
} else {
for (i=0; i<script_list->num_scripts; i++) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list