]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Use STRLEN in two places
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 May 2018 09:09:37 +0000 (11:09 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 13 May 2018 20:07:37 +0000 (22:07 +0200)
src/basic/fs-util.c
src/tmpfiles/tmpfiles.c

index 232a21c19305cde228d34847a999e1b588d628f1..32a6efdffd41cc4920f0c2f547ecc83ed242a801 100644 (file)
@@ -242,7 +242,7 @@ int fchmod_umask(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
          * O_PATH. Indeed fchmodat() doesn't have the AT_EMPTY_PATH flag like
index 46098c215c3546a056284cf5e61f2602713e8f54..82cda5db20ec984840c7fa1bf3af8a1d39a17e71 100644 (file)
@@ -1307,7 +1307,7 @@ static int item_do(Item *i, int fd, const struct stat *st, fdaction_t action) {
         r = action(i, fd, st);
 
         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;
                 struct dirent *de;