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 /lib/libc/stat | |
| parent | 8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff) | |
Clang-tidy fixes
Diffstat (limited to 'lib/libc/stat')
| -rw-r--r-- | lib/libc/stat/fstatat.c | 16 | ||||
| -rw-r--r-- | lib/libc/stat/utimensat.c | 3 |
2 files changed, 7 insertions, 12 deletions
diff --git a/lib/libc/stat/fstatat.c b/lib/libc/stat/fstatat.c index 746848b7..ed3c0272 100644 --- a/lib/libc/stat/fstatat.c +++ b/lib/libc/stat/fstatat.c @@ -6,13 +6,11 @@ #include <bits/stat.h> // for stat #include <syscall.h> // for __syscall_5, syscall -#define makedev(major, minor) \ - ((((major) & 0xfffff000ULL) << 32) | \ - (((major) & 0x00000fffULL) << 8) | \ - (((minor) & 0xffffff00ULL) << 12) | (((minor) & 0x000000ffULL))) +#define makedev(major, minor) \ + ((((major) & 0xfffff000ULL) << 32) | (((major) & 0x00000fffULL) << 8) | (((minor) & 0xffffff00ULL) << 12) | \ + (((minor) & 0x000000ffULL))) -int fstatat(int fd, const char *restrict path, struct stat *restrict buf, - int flag) +int fstatat(int fd, const char *restrict path, struct stat *restrict buf, int flag) { int ret; struct statx stx = { 0 }; @@ -21,15 +19,13 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict buf, if (ret == 0) { if (stx.stx_mask & STATX_BASIC_STATS) { - buf->st_dev = - makedev(stx.stx_dev_major, stx.stx_dev_minor); + buf->st_dev = makedev(stx.stx_dev_major, stx.stx_dev_minor); buf->st_ino = stx.stx_ino; buf->st_mode = stx.stx_mode; buf->st_nlink = stx.stx_nlink; buf->st_uid = stx.stx_uid; buf->st_gid = stx.stx_gid; - buf->st_rdev = - makedev(stx.stx_rdev_major, stx.stx_rdev_minor); + buf->st_rdev = makedev(stx.stx_rdev_major, stx.stx_rdev_minor); buf->st_size = stx.stx_size; buf->st_atim.tv_sec = stx.stx_atime.tv_sec; buf->st_atim.tv_nsec = stx.stx_atime.tv_nsec; diff --git a/lib/libc/stat/utimensat.c b/lib/libc/stat/utimensat.c index aba18657..941eaa74 100644 --- a/lib/libc/stat/utimensat.c +++ b/lib/libc/stat/utimensat.c @@ -3,8 +3,7 @@ #include <syscall.h> // for __syscall_4, syscall #include <time.h> // for timespec -int utimensat(int fd, const char *path, const struct timespec times[2], - int flag) +int utimensat(int fd, const char *path, const struct timespec times[2], int flag) { return syscall(utimensat, fd, path, times, flag); } |
