diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:52:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:54:42 +0200 |
commit | 39f2bc6e7eca8e62e38d52d5d92372dd01a459a6 (patch) | |
tree | 99c22763cc3bcd1e1c8df8ea13cea61c44155c1b | |
parent | tree-wide: use SYNTHETIC_ERRNO() where appropriate (diff) | |
download | systemd-39f2bc6e7eca8e62e38d52d5d92372dd01a459a6.tar.xz systemd-39f2bc6e7eca8e62e38d52d5d92372dd01a459a6.zip |
sd-device: use xsprintf() where appropriate
-rw-r--r-- | src/libsystemd/sd-device/sd-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index f455a4eb27..c2315c03fe 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -237,7 +237,7 @@ _public_ int sd_device_new_from_devnum(sd_device **ret, char type, dev_t devnum) assert_return(IN_SET(type, 'b', 'c'), -EINVAL); /* use /sys/dev/{block,char}/<maj>:<min> link */ - snprintf(id, sizeof(id), "%u:%u", major(devnum), minor(devnum)); + xsprintf(id, "%u:%u", major(devnum), minor(devnum)); syspath = strjoina("/sys/dev/", (type == 'b' ? "block" : "char"), "/", id); |