Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddca8f3e authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -30,9 +30,11 @@

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';
	return j;