On Fri, 2011-10-14 at 11:46 +0300, Andy Shevchenko wrote: > On Fri, Oct 14, 2011 at 3:41 AM, Nicholas A. Bellinger > <nab@xxxxxxxxxxxxxxx> wrote: > > > (nab: Fix up minor compile breakage) > Am I late for comment? > > > --- a/drivers/target/iscsi/iscsi_target_auth.c > > +++ b/drivers/target/iscsi/iscsi_target_auth.c > > > 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); > > > > - for (i = 0; i < len; i += 2) { > > - dst[j++] = (unsigned char) chap_asciihex_to_binaryhex(&src[i]); > > - } > > + hex2bin(dst, src, len); > len in this case should be j. That's why in broken version it called > length. hex2bin accepts length in bytes to convert. > Thanks Andy. Fixed this up in lio-core-2.6.git and rebased the original patch into target-pending.git. --nab -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html