From 41a287734fbcc516cb8d3643486a3364f04c8920 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 1 Jun 2017 03:53:08 +0000 Subject: [PATCH] iscsi-scst: fix a couple of bad-function-cast warnings This is a "marginal" warning, but there are only six of them in the SCST code and this fixes two of those. session.c:105:4: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast] target.c:668:14: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast] Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7200 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/session.c | 2 +- iscsi-scst/kernel/target.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index dd80debbe..20990cfca 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -102,7 +102,7 @@ static int iscsi_session_alloc(struct iscsi_target *target, if (!session->sess_params.rdma_extensions) { err = iscsi_threads_pool_get( - (bool)scst_get_acg_tgt_priv(session->scst_sess->acg), + scst_get_acg_tgt_priv(session->scst_sess->acg) != NULL, &session->scst_sess->acg->acg_cpu_mask, &session->sess_thr_pool); if (err != 0) diff --git a/iscsi-scst/kernel/target.c b/iscsi-scst/kernel/target.c index 3abe23f21..3b563139f 100644 --- a/iscsi-scst/kernel/target.c +++ b/iscsi-scst/kernel/target.c @@ -665,7 +665,7 @@ static ssize_t iscsi_acg_sess_dedicated_threads_show(struct kobject *kobj, TRACE_ENTRY(); acg = container_of(kobj, struct scst_acg, acg_kobj); - dedicated = (bool)scst_get_acg_tgt_priv(acg); + dedicated = scst_get_acg_tgt_priv(acg) != NULL; pos = sprintf(buf, "%d\n%s", dedicated, dedicated ? SCST_SYSFS_KEY_MARK "\n" : "");