mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
Since the expression "sizeof(*sense) + sizeof(*sense) % 4" did not make
sense, replaced this expression by "sizeof(*sense)" and a BUILD_BUG_ON() statement that verifies that sizeof(*sense) is a multiple of four. Should the first expression have been "roundup(sizeof(*sense), 4)" ? git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1146,8 +1146,9 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch,
|
||||
int sense_data_len;
|
||||
int resp_len;
|
||||
|
||||
sense_data_len = (s_key == NO_SENSE) ? 0
|
||||
: sizeof(*sense) + sizeof(*sense) % 4;
|
||||
BUILD_BUG_ON((sizeof(*sense) % 4) != 0);
|
||||
|
||||
sense_data_len = (s_key == NO_SENSE) ? 0 : sizeof(*sense);
|
||||
resp_len = sizeof(*srp_rsp) + sense_data_len;
|
||||
|
||||
srp_rsp = ioctx->buf;
|
||||
|
||||
Reference in New Issue
Block a user