Whamcloud - gitweb
LU-6142 libcfs: discard cfs_strrstr()
cfs_strrstr() is only used in one place, and it can easily be open
coded there without increasing code complexity. In particular the
fact that the "needle" cannot meaningfully be at the start of the
"haystack", means a simple loop does all we need.
In fact, there is room to improve the code in lwp_setup()
- sprintf isn't needed as the result is a constant that can
be calculated at compile time
- adding the nul termination is then not needed as the buffer
being copied to was initialised to zeroes.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I52b4abb36cf809d3bd9eebcc752959b0a81bfc13
Reviewed-on: https://review.whamcloud.com/40861
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>