chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdfee94
)
sd-device: initialize variable
author
Tom Gundersen
<teg@jklm.no>
Fri, 3 Apr 2015 15:27:00 +0000
(17:27 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Fri, 3 Apr 2015 15:27:00 +0000
(17:27 +0200)
sysnum would not be initialized if sysname had no trailing digits.
src/libsystemd/sd-device/sd-device.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-device/sd-device.c
b/src/libsystemd/sd-device/sd-device.c
index da1052c8fbb54d5e0c2bdf7e8ef5409eb7304205..3179d16b213a45a5eb0308f644b90dceed4cbc03 100644
(file)
--- a/
src/libsystemd/sd-device/sd-device.c
+++ b/
src/libsystemd/sd-device/sd-device.c
@@
-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;