]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iscsi-target: Use kcalloc() in iscsit_allocate_iovecs()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 9 Apr 2017 13:06:00 +0000 (15:06 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 2 May 2017 05:21:05 +0000 (22:21 -0700)
commitf1725110324d97d841609fd0b3536eb3ead77086
treedd8838a43c9eb4ee43d58c1762f35d59fce81235
parent056e8924a072d22007275dfb8b247bb814765b67
iscsi-target: Use kcalloc() in iscsit_allocate_iovecs()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus use the corresponding function "kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data structure by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c