Commit ddca8f3e authored by Nicholas Bellinger's avatar Nicholas Bellinger

iscsi-target: Fix hex2bin warn_unused compile message

Fix the following compile warning with hex2bin() usage:

drivers/target/iscsi/iscsi_target_auth.c: In function ‘chap_string_to_hex’:
drivers/target/iscsi/iscsi_target_auth.c:35: warning: ignoring return value of ‘hex2bin’, declared with attribute warn_unused_result
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent c638830d
...@@ -30,9 +30,11 @@ ...@@ -30,9 +30,11 @@
static int chap_string_to_hex(unsigned char *dst, unsigned char *src, int len) static int chap_string_to_hex(unsigned char *dst, unsigned char *src, int len)
{ {
int j = DIV_ROUND_UP(len, 2); int j = DIV_ROUND_UP(len, 2), rc;
hex2bin(dst, src, j); rc = hex2bin(dst, src, j);
if (rc < 0)
pr_debug("CHAP string contains non hex digit symbols\n");
dst[j] = '\0'; dst[j] = '\0';
return j; return j;
......
Markdown is supported
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