mirror of
https://github.com/systemd/systemd.git
synced 2024-12-12 03:33:44 +08:00
sd-device: initialize variable
sysnum would not be initialized if sysname had no trailing digits.
This commit is contained in:
parent
cdfee94318
commit
afcac065c0
@ -930,7 +930,7 @@ _public_ int sd_device_get_devname(sd_device *device, const char **devname) {
|
||||
|
||||
static int device_set_sysname(sd_device *device) {
|
||||
_cleanup_free_ char *sysname = NULL;
|
||||
const char *sysnum;
|
||||
const char *sysnum = NULL;
|
||||
const char *pos;
|
||||
size_t len = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user