summaryrefslogtreecommitdiffstats
path: root/xlators/features/selinux
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-30 15:25:01 +0530
committerXavi Hernandez <xhernandez@redhat.com>2019-06-03 08:43:13 +0000
commit0f29cabac22c48a0895e2b136f3fd48d9577052b (patch)
treee1f9e6c6bd10ac10ac58ae3816ca728cc849808b /xlators/features/selinux
parent899b2170945c6023b0037fed70b19aa3cc680a22 (diff)
lcov: improve line coverage
upcall: remove extra variable assignment and use just one initialization. open-behind: reduce the overall number of lines, in functions not frequently called selinux: reduce some lines in init failure cases updates: bz#1693692 Change-Id: I7c1de94f2ec76a5bfe1f48a9632879b18e5fbb95 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features/selinux')
-rw-r--r--xlators/features/selinux/src/selinux.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/xlators/features/selinux/src/selinux.c b/xlators/features/selinux/src/selinux.c
index 58b4c5d4503..e8e16cde8c4 100644
--- a/xlators/features/selinux/src/selinux.c
+++ b/xlators/features/selinux/src/selinux.c
@@ -234,7 +234,6 @@ init(xlator_t *this)
priv = GF_CALLOC(1, sizeof(*priv), gf_selinux_mt_selinux_priv_t);
if (!priv) {
gf_log(this->name, GF_LOG_ERROR, "out of memory");
- ret = ENOMEM;
goto out;
}
@@ -242,7 +241,6 @@ init(xlator_t *this)
this->local_pool = mem_pool_new(selinux_priv_t, 64);
if (!this->local_pool) {
- ret = -1;
gf_msg(this->name, GF_LOG_ERROR, ENOMEM, SL_MSG_ENOMEM,
"Failed to create local_t's memory pool");
goto out;
@@ -252,9 +250,7 @@ init(xlator_t *this)
ret = 0;
out:
if (ret) {
- if (priv) {
- GF_FREE(priv);
- }
+ GF_FREE(priv);
mem_pool_destroy(this->local_pool);
}
return ret;