mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 04:17:02 -05:00
Reduces memory occupation.
This commit is contained in:
parent
19d660f383
commit
f4f5554287
9 changed files with 102 additions and 81 deletions
18
util.h
18
util.h
|
|
@ -94,24 +94,6 @@ void pathprint(char* str, size_t size, const char* format, ...);
|
|||
*/
|
||||
void pathslash(char* str, size_t size);
|
||||
|
||||
/****************************************************************************/
|
||||
/* bit */
|
||||
|
||||
static inline int bit_has(unsigned bit, unsigned mask)
|
||||
{
|
||||
return (bit & mask) == mask;
|
||||
}
|
||||
|
||||
static inline unsigned bit_set(unsigned bit, unsigned mask)
|
||||
{
|
||||
return bit | mask;
|
||||
}
|
||||
|
||||
static inline unsigned bit_clear(unsigned bit, unsigned mask)
|
||||
{
|
||||
return bit & ~mask;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue