mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
Convert sizeof expr into sizeof(expr) (merge r4556 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -105,7 +105,7 @@ static char *next_key(char **data, int *datasize, char **value)
|
||||
static struct buf_segment *conn_alloc_buf_segment(struct connection *conn,
|
||||
size_t sz)
|
||||
{
|
||||
struct buf_segment *seg = malloc(sizeof *seg + sz);
|
||||
struct buf_segment *seg = malloc(sizeof(*seg) + sz);
|
||||
|
||||
if (seg) {
|
||||
seg->len = 0;
|
||||
@@ -640,7 +640,7 @@ static void cmnd_reject(struct connection *conn, u8 reason)
|
||||
conn_free_rsp_buf_list(conn);
|
||||
seg = conn_alloc_buf_segment(conn, data_sz);
|
||||
|
||||
memset(rej, 0x0, sizeof *rej);
|
||||
memset(rej, 0x0, sizeof(*rej));
|
||||
rej->opcode = ISCSI_OP_REJECT_MSG;
|
||||
rej->reason = reason;
|
||||
rej->ffffffff = ISCSI_RESERVED_TAG;
|
||||
|
||||
@@ -178,7 +178,7 @@ int scst_tg_tgt_add(struct scst_target_group *tg, const char *name)
|
||||
BUG_ON(!tg);
|
||||
BUG_ON(!name);
|
||||
res = -ENOMEM;
|
||||
tg_tgt = kzalloc(sizeof *tg_tgt, GFP_KERNEL);
|
||||
tg_tgt = kzalloc(sizeof(*tg_tgt), GFP_KERNEL);
|
||||
if (!tg_tgt)
|
||||
goto out;
|
||||
tg_tgt->tg = tg;
|
||||
@@ -298,7 +298,7 @@ int scst_tg_add(struct scst_dev_group *dg, const char *name)
|
||||
|
||||
TRACE_ENTRY();
|
||||
res = -ENOMEM;
|
||||
tg = kzalloc(sizeof *tg, GFP_KERNEL);
|
||||
tg = kzalloc(sizeof(*tg), GFP_KERNEL);
|
||||
if (!tg)
|
||||
goto out;
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24)
|
||||
@@ -424,7 +424,7 @@ int scst_dg_dev_add(struct scst_dev_group *dg, const char *name)
|
||||
int res;
|
||||
|
||||
res = -ENOMEM;
|
||||
dgdev = kzalloc(sizeof *dgdev, GFP_KERNEL);
|
||||
dgdev = kzalloc(sizeof(*dgdev), GFP_KERNEL);
|
||||
if (!dgdev)
|
||||
goto out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user