From: Simon Wilkinson Date: Tue, 15 Jun 2010 15:51:42 +0000 (+0100) Subject: ptserver: Don't print undefined value X-Git-Tag: upstream/1.8.0_pre1^2~3494 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2d61f1fcbb7c42de6164795fc07e18776afc77cf;p=packages%2Fo%2Fopenafs.git 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 --- 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,