From 2d61f1fcbb7c42de6164795fc07e18776afc77cf Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 15 Jun 2010 16:51:42 +0100 Subject: [PATCH] ptserver: Don't print undefined value The readgroup utility printed the wrong variable when listing the source group - instead of printing the group name, it tried to print an arbitrary element from the list of group members. Fix it to print the right thing. Caught by clang-analyzer. Change-Id: Ie7ada8a1e881871ae5db14714ee10325ac052d40 Reviewed-on: http://gerrit.openafs.org/5076 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/ptserver/readgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ptserver/readgroup.c b/src/ptserver/readgroup.c index 456916bb8..c48d135de 100644 --- a/src/ptserver/readgroup.c +++ b/src/ptserver/readgroup.c @@ -147,8 +147,7 @@ main(int argc, char **argv) } else { /* add the members of a group to the group */ if (verbose) - printf("Adding %s to %s.\n", - lnames.namelist_val[i], gname); + printf("Adding %s to %s.\n", name, gname); code = pr_ListMembers(name, &lnames); if (code) { fprintf(stderr, -- 2.39.5