summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-01 10:38:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-01 11:46:40 +0200
commit0e210cc91233378db959f75535b8a8c759eb0a30 (patch)
tree8db1fe91537a1e84c05d7e5a152a10b5ab261966
parent00e4e502a9ff5a60df07e54d344123347da32e80 (diff)
Fix uninitialize return status in fstree_relabel_selinux
Should the inode table theoretically be empty, the function returns an undefined value. This commit fixes that case by initializing the return status to 0, so it returns success status in that case. Bug found using scan-build. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/fstree/selinux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fstree/selinux.c b/lib/fstree/selinux.c
index b7934ea..ceaac06 100644
--- a/lib/fstree/selinux.c
+++ b/lib/fstree/selinux.c
@@ -43,7 +43,7 @@ int fstree_relabel_selinux(fstree_t *fs, const char *filename)
{ SELABEL_OPT_PATH, filename },
};
size_t i;
- int ret;
+ int ret = 0;
sehnd = selabel_open(SELABEL_CTX_FILE, seopts, 1);