mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
27 lines
244 B
C
27 lines
244 B
C
#include "util.h"
|
|
|
|
/* misc utility code */
|
|
|
|
|
|
void*
|
|
util_malloc0(int size)
|
|
{
|
|
void *p;
|
|
|
|
p = malloc(size);
|
|
memset(p, 0, size);
|
|
|
|
return p;
|
|
}
|
|
|
|
int
|
|
util_next_p2 ( int a )
|
|
{
|
|
int rval=1;
|
|
while(rval < a)
|
|
rval <<= 1;
|
|
|
|
return rval;
|
|
}
|
|
|