]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ptserver: Incorrect variable used to print error msg
authorCheyenne Wills <cwills@sinenomine.net>
Tue, 25 Jun 2019 21:39:40 +0000 (15:39 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sun, 26 Jan 2020 12:04:35 +0000 (07:04 -0500)
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 <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f938f5f248a3cb3f7ac871f5ef45a0e2d043706b)

Change-Id: I1b993ddc2545f90736811e2eb85ba4b3bae6e657
Reviewed-on: https://gerrit.openafs.org/13728
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/ptserver/testpt.c

index c9d60c2009caaa30522415f12b553ce91320b84c..8deb88340108087c0e0727691f158a3209a209b9 100644 (file)
@@ -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;
        }