linux/drivers/nvme/target
Bart Van Assche 43a6f8fb61 nvmet: use strcmp() instead of strncmp() for subsystem lookup
strncmp() stops comparing when either the end of one of the first two arguments
is reached or when 'n' characters have been compared, whichever comes first.
That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds
the length of s1 or the length of s2. Since that is the case in
nvmet_find_get_subsys(), change strncmp() into strcmp(). This patch avoids that
the following warning is reported by smatch:

drivers/nvme/target/core.c:940:1 nvmet_find_get_subsys() error: strncmp() '"nqn.2014-08.org.nvmexpress.discovery"' too small (37 vs 223)

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-10-17 08:58:24 +02:00
..
admin-cmd.c nvmet: remove redundant module prefix 2018-10-01 14:16:09 -07:00
configfs.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
core.c nvmet: use strcmp() instead of strncmp() for subsystem lookup 2018-10-17 08:58:24 +02:00
discovery.c nvmet: remove unreachable code 2018-10-17 08:58:23 +02:00
fabrics-cmd.c nvmet: remove duplicate NULL initialization for req->ns 2018-05-25 16:50:12 +02:00
fc.c nvmet_fc: support target port removal with nvmet layer 2018-10-01 14:16:10 -07:00
fcloop.c nvme-fcloop: Fix dropped LS's to removed target port 2018-08-28 08:40:43 +02:00
io-cmd-bdev.c nvmet: don't split large I/Os unconditionally 2018-10-01 14:16:13 -07:00
io-cmd-file.c nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
Kconfig nvmet-rdma: depend on INFINIBAND_ADDR_TRANS 2018-04-27 11:15:43 -04:00
loop.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
Makefile nvmet: add simple file backed ns support 2018-05-25 16:50:12 +02:00
nvmet.h nvmet: don't split large I/Os unconditionally 2018-10-01 14:16:13 -07:00
rdma.c nvmet-rdma: use a private workqueue for delete 2018-10-05 09:25:18 +02:00