Skip to content

Commit

Permalink
iscsi-target: Fix hex2bin warn_unused compile message
Browse files Browse the repository at this point in the history
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: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Dec 6, 2011
1 parent c638830 commit ddca8f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/target/iscsi/iscsi_target_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ddca8f3

Please sign in to comment.