mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-20 07:50:48 +01:00
Fix maybe-uninitialized warnings
Building with a releaes build reshuffles things so this ends causing potential issues. Initialize to NULL to avoid around this. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a835093321
commit
f3a60ca6b3
2 changed files with 2 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ ei_setup_backend_socket(struct ei *ei, const char *socketpath)
|
|||
assert(socketpath);
|
||||
assert(socketpath[0] != '\0');
|
||||
|
||||
_cleanup_free_ char *path;
|
||||
_cleanup_free_ char *path = NULL;
|
||||
if (socketpath[0] == '/') {
|
||||
path = xstrdup(socketpath);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ eis_setup_backend_socket(struct eis *eis, const char *socketpath)
|
|||
_cleanup_(eis_socket_cleanup) struct eis_socket *eis_socket =
|
||||
eis_socket_create(&eis->object);
|
||||
|
||||
_cleanup_free_ char *path;
|
||||
_cleanup_free_ char *path = NULL;
|
||||
if (socketpath[0] == '/') {
|
||||
path = xstrdup(socketpath);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue