diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
commit | b9098066cd6284319bca922f13e59517f774a103 (patch) | |
tree | f01fd6c9053cb01ed84c00cb42ee789adafceaf5 /source/components/utilities/utprint.c | |
parent | 1e24cf365bc9c8df179b145c90d52852724e54ee (diff) |
Notes
Diffstat (limited to 'source/components/utilities/utprint.c')
-rw-r--r-- | source/components/utilities/utprint.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c index 6d7b87cd3e8a5..1b0e12b32f132 100644 --- a/source/components/utilities/utprint.c +++ b/source/components/utilities/utprint.c @@ -390,8 +390,8 @@ AcpiUtFormatNumber ( String = AcpiUtBoundStringOutput (String, End, '0'); if (Base == 16) { - String = AcpiUtBoundStringOutput (String, End, - Upper ? 'X' : 'x'); + String = AcpiUtBoundStringOutput ( + String, End, Upper ? 'X' : 'x'); } } if (!(Type & ACPI_FORMAT_LEFT)) @@ -500,6 +500,7 @@ AcpiUtVsnprintf ( { break; } + } while (1); /* Process width */ @@ -537,6 +538,7 @@ AcpiUtVsnprintf ( ++Format; Precision = va_arg (Args, int); } + if (Precision < 0) { Precision = 0; @@ -599,11 +601,13 @@ AcpiUtVsnprintf ( Pos = AcpiUtBoundStringOutput (Pos, End, ' '); } } + for (i = 0; i < Length; ++i) { Pos = AcpiUtBoundStringOutput (Pos, End, *s); ++s; } + while (Length < Width--) { Pos = AcpiUtBoundStringOutput (Pos, End, ' '); @@ -642,8 +646,8 @@ AcpiUtVsnprintf ( } p = va_arg (Args, void *); - Pos = AcpiUtFormatNumber (Pos, End, - ACPI_TO_INTEGER (p), 16, Width, Precision, Type); + Pos = AcpiUtFormatNumber ( + Pos, End, ACPI_TO_INTEGER (p), 16, Width, Precision, Type); continue; default: @@ -694,7 +698,7 @@ AcpiUtVsnprintf ( } Pos = AcpiUtFormatNumber (Pos, End, Number, Base, - Width, Precision, Type); + Width, Precision, Type); } if (Size > 0) @@ -773,7 +777,7 @@ AcpiUtFileVprintf ( Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock); Length = AcpiUtVsnprintf (AcpiGbl_PrintBuffer, - sizeof (AcpiGbl_PrintBuffer), Format, Args); + sizeof (AcpiGbl_PrintBuffer), Format, Args); (void) AcpiOsWriteFile (File, AcpiGbl_PrintBuffer, Length, 1); AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags); |