summaryrefslogtreecommitdiffstats
path: root/bin/pwd
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-06-30 17:05:40 +0000
committerkan <kan@FreeBSD.org>2003-06-30 17:05:40 +0000
commitaf13d33552593b7cb9676bfd7a90d049405a6bac (patch)
tree51087613394c3a153121815b15cc2d0800263500 /bin/pwd
parentc4ce25275ca8b5cae088594890edd4ef17c28763 (diff)
downloadFreeBSD-src-af13d33552593b7cb9676bfd7a90d049405a6bac.zip
FreeBSD-src-af13d33552593b7cb9676bfd7a90d049405a6bac.tar.gz
Rename a local variable in order to avoid collision with standard 'log'
function.
Diffstat (limited to 'bin/pwd')
-rw-r--r--bin/pwd/pwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c
index 8eedc0b..888b26e 100644
--- a/bin/pwd/pwd.c
+++ b/bin/pwd/pwd.c
@@ -108,7 +108,7 @@ usage(void)
static char *
getcwd_logical(void)
{
- struct stat log, phy;
+ struct stat lg, phy;
char *pwd;
/*
@@ -116,9 +116,9 @@ getcwd_logical(void)
* the current working directory.
*/
if ((pwd = getenv("PWD")) != NULL && *pwd == '/') {
- if (stat(pwd, &log) == -1 || stat(".", &phy) == -1)
+ if (stat(pwd, &lg) == -1 || stat(".", &phy) == -1)
return (NULL);
- if (log.st_dev == phy.st_dev && log.st_ino == phy.st_ino)
+ if (lg.st_dev == phy.st_dev && lg.st_ino == phy.st_ino)
return (pwd);
}
OpenPOWER on IntegriCloud