Use STRLEN in two places
This commit is contained in:
parent
9d728570e7
commit
22dd8d350c
|
@ -242,7 +242,7 @@ int fchmod_umask(int fd, mode_t m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int fchmod_opath(int fd, mode_t m) {
|
int fchmod_opath(int fd, mode_t m) {
|
||||||
char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
|
char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
|
||||||
|
|
||||||
/* This function operates also on fd that might have been opened with
|
/* This function operates also on fd that might have been opened with
|
||||||
* O_PATH. Indeed fchmodat() doesn't have the AT_EMPTY_PATH flag like
|
* O_PATH. Indeed fchmodat() doesn't have the AT_EMPTY_PATH flag like
|
||||||
|
|
|
@ -1307,7 +1307,7 @@ static int item_do(Item *i, int fd, const struct stat *st, fdaction_t action) {
|
||||||
r = action(i, fd, st);
|
r = action(i, fd, st);
|
||||||
|
|
||||||
if (S_ISDIR(st->st_mode)) {
|
if (S_ISDIR(st->st_mode)) {
|
||||||
char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
|
char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
|
||||||
_cleanup_closedir_ DIR *d = NULL;
|
_cleanup_closedir_ DIR *d = NULL;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue