summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-02 14:52:01 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-02 14:54:42 +0200
commit39f2bc6e7eca8e62e38d52d5d92372dd01a459a6 (patch)
tree99c22763cc3bcd1e1c8df8ea13cea61c44155c1b
parenttree-wide: use SYNTHETIC_ERRNO() where appropriate (diff)
downloadsystemd-39f2bc6e7eca8e62e38d52d5d92372dd01a459a6.tar.xz
systemd-39f2bc6e7eca8e62e38d52d5d92372dd01a459a6.zip
sd-device: use xsprintf() where appropriate
-rw-r--r--src/libsystemd/sd-device/sd-device.c2
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);