hotplug: fix uninitialized variable
authorJo-Philipp Wich <jo@mein.io>
Tue, 13 Dec 2016 15:26:03 +0000 (16:26 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 13 Dec 2016 15:34:38 +0000 (16:34 +0100)
commit9cec4e6a94a6456bbb3deb14688c690217e4190c
tree9ea7053633f4475f409f0137d729f396d817552d
parent28f584ff290d0ee43a1c3604efd2e99931fe4d04
hotplug: fix uninitialized variable

Commit e999ab7 (hotplug: Check chown return value) introduced a new variable
"ret" which is not explicitely initialized, leading to the following compile
error:

    hotplug.c:155:18: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        if (!g || ret < 0)
                      ^
    cc1: all warnings being treated as errors

Explicitely initialize it to zero to avoid that problem.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
plug/hotplug.c