summaryrefslogtreecommitdiff
path: root/StdLib
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib')
-rw-r--r--StdLib/Include/Containers/Fifo.h4
-rw-r--r--StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c16
2 files changed, 11 insertions, 9 deletions
diff --git a/StdLib/Include/Containers/Fifo.h b/StdLib/Include/Containers/Fifo.h
index 3b232fec23..69dd55b03e 100644
--- a/StdLib/Include/Containers/Fifo.h
+++ b/StdLib/Include/Containers/Fifo.h
@@ -151,8 +151,10 @@ typedef size_t (EFIAPI *cFIFO_Flush) (cFIFO *Self, size_t NumToFlush);
/** Remove the most recent element from the FIFO.
@param[in] Self Pointer to the FIFO instance.
+
+ @return Returns the number of elements remaining in the FIFO.
**/
-typedef void (EFIAPI *cFIFO_Truncate) (cFIFO *Self);
+typedef size_t (EFIAPI *cFIFO_Truncate) (cFIFO *Self);
/** Cleanly delete a FIFO instance.
diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
index 2da0628840..1c978eae70 100644
--- a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
+++ b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
@@ -263,8 +263,10 @@ IIO_GetOutputSize (
@param[in] EndXY Pointer to the ending coordinate pair.
@return Returns the difference between the starting and ending coordinates.
+ The return value is positive if the coordinates contained in EndXY
+ are larger than StartXY, otherwise the return value is negative.
**/
-UINT32
+int
EFIAPI
IIO_CursorDelta (
cIIO *This,
@@ -272,17 +274,15 @@ IIO_CursorDelta (
CURSOR_XY *EndXY
)
{
- INT32 ColumnDelta;
- INT32 RowDelta;
+ int ColumnDelta;
+ int RowDelta;
RowDelta = (int)EndXY->Row - (int)StartXY->Row;
assert(RowDelta >= 0); // assert if EndXY is NOT after StartXY
- ColumnDelta = (INT32)((This->MaxColumn * RowDelta) + EndXY->Column);
- ColumnDelta -= (INT32)StartXY->Column;
-
- assert(ColumnDelta >= 0); // assert if EndXY is NOT after StartXY
+ ColumnDelta = (int)((This->MaxColumn * RowDelta) + EndXY->Column);
+ ColumnDelta -= (int)StartXY->Column;
- return (UINT32)ColumnDelta;
+ return ColumnDelta;
}