summaryrefslogtreecommitdiff
path: root/src/basic/device-nodes.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-14 19:02:29 +0100
committerGitHub <noreply@github.com>2017-12-14 19:02:29 +0100
commitfbd0b64f44a7bae678137d67ad5da202f6b8d809 (patch)
tree0402dca4e258583e009d07c0d8eb9c0fad19d5ac /src/basic/device-nodes.h
parent1142cbd76a1db2adb2c382b76fc0a1c5a97c70cc (diff)
downloadsystemd-fbd0b64f44a7bae678137d67ad5da202f6b8d809.tar.gz
tree-wide: make use of new STRLEN() macro everywhere (#7639)
Let's employ coccinelle to do this for us. Follow-up for #7625.
Diffstat (limited to 'src/basic/device-nodes.h')
-rw-r--r--src/basic/device-nodes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/device-nodes.h b/src/basic/device-nodes.h
index 6136526f84..7dd8a772a5 100644
--- a/src/basic/device-nodes.h
+++ b/src/basic/device-nodes.h
@@ -30,11 +30,11 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len);
int whitelisted_char_for_devnode(char c, const char *additional);
#define SYS_BLOCK_PATH_MAX(suffix) \
- (strlen("/sys/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t) + strlen_ptr(suffix))
+ (STRLEN("/sys/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t) + strlen_ptr(suffix))
#define xsprintf_sys_block_path(buf, suffix, devno) \
xsprintf(buf, "/sys/dev/block/%u:%u%s", major(devno), minor(devno), strempty(suffix))
#define DEV_NUM_PATH_MAX \
- (strlen("/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t))
+ (STRLEN("/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t))
#define xsprintf_dev_num_path(buf, type, devno) \
xsprintf(buf, "/dev/%s/%u:%u", type, major(devno), minor(devno))