]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libfrog: change project entity variable scope to local/static.
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:25:11 +0000 (13:25 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:25:11 +0000 (13:25 -0500)
commit440cb37c740a4dcf459cd772e18b0d2a67df10cb
tree94ee6f91f0c0e4a2b5239b79f1789d979476090d
parent8ab6f7e09ced804418ce2b9f8fdedca7e96a15bf
libfrog: change project entity variable scope to local/static.

The project quota code used a global variable "p" for getprent() and
getprpathent(), presumably to keep the interface analogous to getpwent()
etc.  However, other functions had their own local "p" which led to shadow
variable warnings from sparse.

Rather than a global, make it a static variable within the project
functions.  Same behavior, same interface, less confusion, and retains an
interface similar that of getpwent etc.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/projects.c