From c42c0c071f3ac6067ff9c53fade2e900342d56ae Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 14 Oct 2015 11:52:24 +0200 Subject: [PATCH] torture: Remove a use of get_my_vnn() Reduce the use of globals Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon May 16 23:23:53 CEST 2016 on sn-devel-144 --- source3/torture/msg_source.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/torture/msg_source.c b/source3/torture/msg_source.c index 293b0995278..c15f24da9e1 100644 --- a/source3/torture/msg_source.c +++ b/source3/torture/msg_source.c @@ -110,7 +110,7 @@ int main(int argc, const char *argv[]) struct messaging_context *msg_ctx; struct tevent_req *req; int ret; - struct server_id id; + struct server_id my_id, id; if (argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]); @@ -130,8 +130,9 @@ int main(int argc, const char *argv[]) perror("messaging_init failed"); return -1; } + my_id = messaging_server_id(msg_ctx); - id = server_id_from_string(get_my_vnn(), argv[1]); + id = server_id_from_string(my_id.vnn, argv[1]); if (!procid_valid(&id)) { fprintf(stderr, "pid %s invalid\n", argv[1]); return -1; -- 2.34.1