summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/detect-virt/detect-virt.c3
-rw-r--r--src/shared/cgroup-util.c2
-rw-r--r--src/udev/udev-builtin.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c
index a83fb3ced5..8b8fc45ea0 100644
--- a/src/detect-virt/detect-virt.c
+++ b/src/detect-virt/detect-virt.c
@@ -115,7 +115,8 @@ static int parse_argv(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
const char *id = NULL;
- int retval, r;
+ int r;
+ int retval = EXIT_SUCCESS;
/* This is mostly intended to be used for scripts which want
* to detect whether we are being run in a virtualized
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index 3cb41c7c5f..d34c142729 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -514,7 +514,7 @@ static const char *normalize_controller(const char *controller) {
}
static int join_path(const char *controller, const char *path, const char *suffix, char **fs) {
- char *t;
+ char *t = NULL;
if (!(controller || path))
return -EINVAL;
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
index b8cdc708bc..6509f5881d 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -42,7 +42,7 @@ static const struct udev_builtin *builtins[] = {
int udev_builtin_init(struct udev *udev)
{
unsigned int i;
- int err;
+ int err = 0;
for (i = 0; i < ELEMENTSOF(builtins); i++) {
if (builtins[i]->init) {