summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2015-06-25 16:06:40 +0200
committerMichal Sekletar <msekleta@redhat.com>2015-06-25 16:15:36 +0200
commit77cd2c87a47c49aa9063fbaa4d9077f4a381cab1 (patch)
treea9c9de0d0e7623e330c1d26a6c0429c21ae10ebd /src
parent9ebdb1e057045d2b96f5980c61667cd41914177b (diff)
install: explicitly return 0 on success
Maybe there is some left-over value stored in r from previous function call. Let's make sure we always return consistent error code when we reach end of the function body. Fixes following crash of test-install, Assertion 'r == 0' failed at src/test/test-install.c:52, function main(). Aborting. [1] 11703 abort (core dumped) ./test-install
Diffstat (limited to 'src')
-rw-r--r--src/shared/install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 559fda211d..c37cf1948a 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -2263,7 +2263,7 @@ int unit_file_get_list(
}
}
- return r;
+ return 0;
}
static const char* const unit_file_state_table[_UNIT_FILE_STATE_MAX] = {