mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Change mem_has_null
return type to bool
This commit is contained in:
parent
cb6de6a384
commit
d4809fa9a8
|
@ -228,7 +228,7 @@ int mem_comp(const void *a, const void *b, int size)
|
||||||
return memcmp(a, b, size);
|
return memcmp(a, b, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mem_has_null(const void *block, unsigned size)
|
bool mem_has_null(const void *block, unsigned size)
|
||||||
{
|
{
|
||||||
const unsigned char *bytes = (const unsigned char *)block;
|
const unsigned char *bytes = (const unsigned char *)block;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
@ -236,10 +236,10 @@ int mem_has_null(const void *block, unsigned size)
|
||||||
{
|
{
|
||||||
if(bytes[i] == 0)
|
if(bytes[i] == 0)
|
||||||
{
|
{
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOHANDLE io_open_impl(const char *filename, int flags)
|
IOHANDLE io_open_impl(const char *filename, int flags)
|
||||||
|
|
|
@ -181,10 +181,9 @@ int mem_comp(const void *a, const void *b, int size);
|
||||||
* @param block Pointer to the block to check for nulls.
|
* @param block Pointer to the block to check for nulls.
|
||||||
* @param size Size of the block.
|
* @param size Size of the block.
|
||||||
*
|
*
|
||||||
* @return 1 - The block has a null byte.
|
* @return true if the block has a null byte, false otherwise.
|
||||||
* @return 0 - The block does not have a null byte.
|
|
||||||
*/
|
*/
|
||||||
int mem_has_null(const void *block, unsigned size);
|
bool mem_has_null(const void *block, unsigned size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup File-IO
|
* @defgroup File-IO
|
||||||
|
|
Loading…
Reference in a new issue