From b7212cf420c63281154a48477c4856155600cd7b Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 20 Dec 2010 18:27:57 +0000 Subject: [PATCH] Cleanup: eliminate a superfluous cast and unnest an if-statement Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3151 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_targ.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 50dbe3bf0..dad563294 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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);