]> www.infradead.org Git - users/sagi/libnvme.git/commit
fabrics: only look for spaces in strchomp()
authorCaleb Sander <csander@purestorage.com>
Wed, 30 Aug 2023 15:44:48 +0000 (09:44 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 4 Sep 2023 17:23:24 +0000 (19:23 +0200)
commit308c3e15e29177e9321ad3b7c39a4ad9b2961dcb
tree3afd0b8289044a1edac2cbee55881f9aeafaf78d
parent9fd8a963393f0bb1b3328aa2c4abd151562d67ab
fabrics: only look for spaces in strchomp()

strchomp() is only needed to strip trailing spaces from a string.
There is no need to replace NUL characters with NUL characters.
So simplify the check for "NUL or space" to just "space".
Update the function description as well,
as it doesn't strip all whitespace, just spaces.

Signed-off-by: Caleb Sander <csander@purestorage.com>
src/nvme/fabrics.c