kernels/linux-2.4.0/drivers/s390/block/dasd.c
/*sets the string pointer after the next comma, if a parse error occured */
sets the string pointer after the next comma, if a parse error occured
sets the string pointer after the next comma if a parse error occured
static int
dasd_get_next_int (char **strptr)
{
	int j, i = -1;		
	if (isxdigit (**strptr)) {
		for (i = 0; isxdigit (**strptr);) {
			i <<= 4;
			j = dasd_get_hexdigit (**strptr);
			if (j == -1) {
				PRINT_ERR ("no integer: skipping range.\n");
				dasd_scan_for_next_comma (strptr);
				i = -1;
				break;
			}
			i += j;
			(*strptr)++;
			if (i > 0xffff) {
				PRINT_ERR (" value too big, skipping range.\n");
				dasd_scan_for_next_comma (strptr);
				i = -1;
				break;
			}
		}
	}
	return i;
}
static int dasd_get_next_int ( char * * strptr ) { int j , i = -1 ; if ( isxdigit ( * * strptr ) ) { for ( i = 0 ; isxdigit ( * * strptr ) ; ) { i <<= 4 ; j = dasd_get_hexdigit ( * * strptr ) ; if ( j == -1 ) { PRINT_ERR ( " \n " ) ; dasd_scan_for_next_comma ( strptr ) ; i = -1 ; break ; } i += j ; ( * strptr ) ++ ; if ( i > 0xffff ) { PRINT_ERR ( " \n " ) ; dasd_scan_for_next_comma ( strptr ) ; i = -1 ; break ; } } } return i ; }
sets the string pointer after the next comma, if a parse error occured
sets the string pointer after the next comma if a parse error occured
/* for cosmetic reasons first -1, then 0 */