Cleanup: eliminate a superfluous cast and unnest an if-statement

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-12-20 18:27:57 +00:00
parent cb599510d6
commit b7212cf420

View File

@@ -4149,7 +4149,7 @@ static inline int test_cmd_threads(struct scst_cmd_threads *p_cmd_threads)
int scst_cmd_thread(void *arg)
{
struct scst_cmd_threads *p_cmd_threads = (struct scst_cmd_threads *)arg;
struct scst_cmd_threads *p_cmd_threads = arg;
static DEFINE_MUTEX(io_context_mutex);
TRACE_ENTRY();
@@ -4230,10 +4230,9 @@ int scst_cmd_thread(void *arg)
EXTRACHECKS_BUG_ON((p_cmd_threads->nr_threads == 1) &&
!list_empty(&p_cmd_threads->active_cmd_list));
if (p_cmd_threads != &scst_main_cmd_threads) {
if (p_cmd_threads->nr_threads == 1)
p_cmd_threads->io_context = NULL;
}
if ((p_cmd_threads != &scst_main_cmd_threads) &&
(p_cmd_threads->nr_threads == 1))
p_cmd_threads->io_context = NULL;
PRINT_INFO("Processing thread %s (PID %d) finished", current->comm,
current->pid);