Make mNumFreeBuffers unsigned (#1204)

* Make mNumFreeBuffers a uint rather then an int since the number of free buffers should never be negative.
This commit is contained in:
Adam Eliot
2017-01-26 17:58:53 -08:00
committed by Jonathan Hui
parent 827a480787
commit 5ba516f960
3 changed files with 21 additions and 11 deletions
+3 -3
View File
@@ -65,11 +65,11 @@ extern "C" {
/**
* Initialize the platform implemented message pool.
*
* @param[in] aMinNumFreeBuffers An int containing the minimum number of free buffers desired by OpenThread.
* @param[in] aMinNumFreeBuffers An uint16 containing the minimum number of free buffers desired by OpenThread.
* @param[in] aBufferSize The size in bytes of a Buffer object.
*
*/
void otPlatMessagePoolInit(int aMinNumFreeBuffers, size_t aBufferSize);
void otPlatMessagePoolInit(uint16_t aMinNumFreeBuffers, size_t aBufferSize);
/**
* Allocate a buffer from the platform managed buffer pool.
@@ -93,7 +93,7 @@ void otPlatMessagePoolFree(struct BufferHeader *aBuffer);
* @returns The number of buffers currently free and available to OpenThread.
*
*/
int otPlatMessagePoolNumFreeBuffers(void);
uint16_t otPlatMessagePoolNumFreeBuffers(void);
#ifdef __cplusplus
} // extern "C"