On Mon, 2011-10-10 at 12:35 +0300, Andy Shevchenko wrote: > On Sat, 2011-10-08 at 17:18 -0700, Nicholas A. Bellinger wrote: > > On Fri, 2011-09-30 at 14:39 +0300, Andy Shevchenko wrote: > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > > Cc: "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx> > > > --- > > > drivers/target/iscsi/iscsi_target_auth.c | 37 +++++------------------------- > > > 1 files changed, 6 insertions(+), 31 deletions(-) > > > > > > diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c > > > index 11fd743..f3c6899 100644 > > > --- a/drivers/target/iscsi/iscsi_target_auth.c > > > +++ b/drivers/target/iscsi/iscsi_target_auth.c > > > > <SNIP> > > > > > static int chap_string_to_hex(unsigned char *dst, unsigned char *src, int len) > > > { > > > - int i, j = 0; > > > + int j = DIV_ROUND_UP(len, 2); > > > + int rc; > > > > > > - for (i = 0; i < len; i += 2) { > > > - dst[j++] = (unsigned char) chap_asciihex_to_binaryhex(&src[i]); > > > - } > > > + rc = hex2bin(dst, src, lenght); > > > + if (rc < 0) > > > + pr_debug("CHAP string contains non hex digit symbols\n"); > > > > > > dst[j] = '\0'; > > > return j; > > > > This patch contained some minor breakage that prevented it from > > compiling.. Fixed up the 'lenght' parameter usage > > Yeah, it was interim solution, which I forgot to fix. Please, please at least compile test patches before sending them to me. > > > and removed the > > incorrect hex2bin() return value checks. > > Hmm. What is right then? > I don't have an issue with pushing this w/o the hex2bin return value checks for now, as I don't know when these external hex2bin changes are being merged into mainline. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html