StdLib\Include\Containers\Fifo.h
Change return type of cFIFO_Truncate to size_t. Makes declaration match definition.
Update comment to describe what is returned.
StdLib\LibC\Uefi\InteractiveIO\IIOutilities.c
Change return type of IIO_CursorDelta to int. Makes declaration match definition.
Change other types from INT32 to int, for consistency.
Update comment for returned values.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14060
6f19259b-4bc3-4df7-8a09-
765794883524
/** Remove the most recent element from the FIFO.\r
\r
@param[in] Self Pointer to the FIFO instance.\r
+\r
+ @return Returns the number of elements remaining in the FIFO.\r
**/\r
-typedef void (EFIAPI *cFIFO_Truncate) (cFIFO *Self);\r
+typedef size_t (EFIAPI *cFIFO_Truncate) (cFIFO *Self);\r
\r
/** Cleanly delete a FIFO instance.\r
\r
@param[in] EndXY Pointer to the ending coordinate pair.\r
\r
@return Returns the difference between the starting and ending coordinates.\r
+ The return value is positive if the coordinates contained in EndXY\r
+ are larger than StartXY, otherwise the return value is negative.\r
**/\r
-UINT32\r
+int\r
EFIAPI\r
IIO_CursorDelta (\r
cIIO *This,\r
CURSOR_XY *EndXY\r
)\r
{\r
- INT32 ColumnDelta;\r
- INT32 RowDelta;\r
+ int ColumnDelta;\r
+ int RowDelta;\r
\r
RowDelta = (int)EndXY->Row - (int)StartXY->Row;\r
\r
assert(RowDelta >= 0); // assert if EndXY is NOT after StartXY\r
\r
- ColumnDelta = (INT32)((This->MaxColumn * RowDelta) + EndXY->Column);\r
- ColumnDelta -= (INT32)StartXY->Column;\r
-\r
- assert(ColumnDelta >= 0); // assert if EndXY is NOT after StartXY\r
+ ColumnDelta = (int)((This->MaxColumn * RowDelta) + EndXY->Column);\r
+ ColumnDelta -= (int)StartXY->Column;\r
\r
- return (UINT32)ColumnDelta;\r
+ return ColumnDelta;\r
}\r