Fix Coverity warning of q2t_ctio_to_cmd() dead code

Coverity warns that 'handle == Q2T_SKIP_HANDLE' can never occur, because
code preceding the test has masked out a handle bit that would be
required for the test to succeed.

Fix that by extending Q2T_SKIP_HANDLE to incorporate
CTIO_INTERMEDIATE_HANDLE_MARK as well.

Reported-by: Steven J. Magnani <steve@digidescorp.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5718 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2014-08-20 02:24:08 +00:00
parent 4d937c42ee
commit bc9a96dfeb

View File

@@ -78,9 +78,13 @@
#define Q2T_STATE_PROCESSED 3 /* SCST done processing */
#define Q2T_STATE_ABORTED 4 /* Command aborted */
/* Special handles */
/*
* Special handles.
* !! Changing them here, make sure that mask in the beginning of
* !! q2t_ctio_to_cmd() changed accordingly!
*/
#define Q2T_NULL_HANDLE 0
#define Q2T_SKIP_HANDLE (0xFFFFFFFF & ~CTIO_COMPLETION_HANDLE_MARK)
#define Q2T_SKIP_HANDLE (0xFFFFFFFF & ~(CTIO_COMPLETION_HANDLE_MARK|CTIO_INTERMEDIATE_HANDLE_MARK))
/* ATIO task_codes field */
#define ATIO_SIMPLE_QUEUE 0