sd-device: use xsprintf() where appropriate
This commit is contained in:
parent
c614711386
commit
39f2bc6e7e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue