From 3cb29cf7768db45bcf1b49cd5aabd3802489a961 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills Date: Tue, 25 Jun 2019 15:39:40 -0600 Subject: [PATCH] ptserver: Incorrect variable used to print error msg In testpt.c the variable cdir is used to print the name of the temporary dir. However at this point in the code cdir is NULL and the variable tmp_conf_dir contains the actual name that should be used in the error message. Flagged as an error when --enable-checking is on and using GCC 9. Reviewed-on: https://gerrit.openafs.org/13662 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit f938f5f248a3cb3f7ac871f5ef45a0e2d043706b) Change-Id: I1b993ddc2545f90736811e2eb85ba4b3bae6e657 Reviewed-on: https://gerrit.openafs.org/13728 Reviewed-by: Andrew Deason Reviewed-by: Marcio Brito Barbosa Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- src/ptserver/testpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptserver/testpt.c b/src/ptserver/testpt.c index c9d60c200..8deb88340 100644 --- a/src/ptserver/testpt.c +++ b/src/ptserver/testpt.c @@ -981,7 +981,7 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock) code = mkdir(tmp_conf_dir, 0777); if ((code < 0) && (errno != EEXIST)) { afs_com_err(whoami, errno, "can't create temporary afsconf dir: %s", - cdir); + tmp_conf_dir); return errno; } -- 2.39.5