Print this page
Address Robert's feedback
*** 54,64 ****
xrealloc(sysdem_ops_t *ops, void *p, size_t oldsz, size_t newsz)
{
if (newsz == oldsz)
return (p);
! ASSERT3U(newsz, >, oldsz);
void *temp = zalloc(ops, newsz);
if (temp == NULL)
return (NULL);
--- 54,64 ----
xrealloc(sysdem_ops_t *ops, void *p, size_t oldsz, size_t newsz)
{
if (newsz == oldsz)
return (p);
! VERIFY3U(newsz, >, oldsz);
void *temp = zalloc(ops, newsz);
if (temp == NULL)
return (NULL);
*** 76,86 ****
def_free(void *p, size_t len)
{
free(p);
}
! /* BEGIN CSTYLED */
! sysdem_ops_t *sysdem_ops_default = &(sysdem_ops_t){
.alloc = malloc,
.free = def_free
};
! /* END CSTYLED */
--- 76,85 ----
def_free(void *p, size_t len)
{
free(p);
}
! static sysdem_ops_t i_sysdem_ops_default = {
.alloc = malloc,
.free = def_free
};
! sysdem_ops_t *sysdem_ops_default = &i_sysdem_ops_default;