Deleted Added
full compact
utstrtoul64.c (316303) utstrtoul64.c (322877)
1/*******************************************************************************
2 *
3 * Module Name: utstrtoul64 - string to 64-bit integer support
4 *
5 ******************************************************************************/
6
7/******************************************************************************
8 *

--- 405 unchanged lines hidden (view full) ---

414 {
415 /* Not ASCII 0-9, terminate */
416
417 goto Exit;
418 }
419
420 /* Convert and insert (add) the decimal digit */
421
1/*******************************************************************************
2 *
3 * Module Name: utstrtoul64 - string to 64-bit integer support
4 *
5 ******************************************************************************/
6
7/******************************************************************************
8 *

--- 405 unchanged lines hidden (view full) ---

414 {
415 /* Not ASCII 0-9, terminate */
416
417 goto Exit;
418 }
419
420 /* Convert and insert (add) the decimal digit */
421
422 NextValue =
423 (ReturnValue * 10) + (AsciiDigit - ACPI_ASCII_ZERO);
422 AcpiUtShortMultiply (ReturnValue, 10, &NextValue);
423 NextValue += (AsciiDigit - ACPI_ASCII_ZERO);
424
425 /* Check for overflow (32 or 64 bit) - return current converted value */
426
427 if (((Flags & ACPI_STRTOUL_32BIT) && (NextValue > ACPI_UINT32_MAX)) ||
428 (NextValue < ReturnValue)) /* 64-bit overflow case */
429 {
430 goto Exit;
431 }

--- 49 unchanged lines hidden (view full) ---

481 {
482 /* Not Hex ASCII A-F, a-f, or 0-9, terminate */
483
484 goto Exit;
485 }
486
487 /* Convert and insert the hex digit */
488
424
425 /* Check for overflow (32 or 64 bit) - return current converted value */
426
427 if (((Flags & ACPI_STRTOUL_32BIT) && (NextValue > ACPI_UINT32_MAX)) ||
428 (NextValue < ReturnValue)) /* 64-bit overflow case */
429 {
430 goto Exit;
431 }

--- 49 unchanged lines hidden (view full) ---

481 {
482 /* Not Hex ASCII A-F, a-f, or 0-9, terminate */
483
484 goto Exit;
485 }
486
487 /* Convert and insert the hex digit */
488
489 ReturnValue =
490 (ReturnValue << 4) | AcpiUtAsciiCharToHex (AsciiDigit);
489 AcpiUtShortShiftLeft (ReturnValue, 4, &ReturnValue);
490 ReturnValue |= AcpiUtAsciiCharToHex (AsciiDigit);
491
492 String++;
493 ValidDigits++;
494 }
495
496Exit:
497 return (ReturnValue);
498}
491
492 String++;
493 ValidDigits++;
494 }
495
496Exit:
497 return (ReturnValue);
498}