Skip to content
Commit 094bb5d7 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Nicholas Bellinger
Browse files

target-core: don't use "const char*" for a buffer that is written to



iscsi_parse_pr_out_transport_id launders the const away via a call to
strstr(), and then modifies the buffer (writing a nul byte) through
the return value. It's cleaner to be honest and simply declare the
parameter as "char*", fixing up the call chain, and allowing us to
drop the cast in the return statement.

Amusingly, the two current callers found it necessary to cast a
non-const pointer to a const.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 30a7acd5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment