diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-25 19:24:38 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-25 20:35:03 +0100 |
| commit | a984eb367c032dbe2577f01238c3d1268526be70 (patch) | |
| tree | 437fef40379b2758b129ccea39df3570fa2d145e /bin/pwd/pwd.c | |
| parent | 8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff) | |
Clang-tidy fixes
Diffstat (limited to 'bin/pwd/pwd.c')
| -rw-r--r-- | bin/pwd/pwd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c index fef433cf..a5cfa248 100644 --- a/bin/pwd/pwd.c +++ b/bin/pwd/pwd.c @@ -36,8 +36,7 @@ int main(int argc, char **argv) const char *pwd; struct stat cst, pst; - if ((pwd = getenv("PWD")) == NULL || *pwd != '/' || - stat(pwd, &pst) < 0) { + if ((pwd = getenv("PWD")) == NULL || *pwd != '/' || stat(pwd, &pst) < 0) { out = cwd; } @@ -45,9 +44,7 @@ int main(int argc, char **argv) perror("pwd: stat"); } - out = (pst.st_dev == cst.st_dev && pst.st_ino == cst.st_ino) ? - pwd : - cwd; + out = (pst.st_dev == cst.st_dev && pst.st_ino == cst.st_ino) ? pwd : cwd; } iov[0].iov_base = (char *)out; |
