mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
96c7ab27c3
commit
3f3ff971ec
345 changed files with 3011 additions and 3011 deletions
|
|
@ -36,7 +36,7 @@ UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr)
|
|||
UDA1380Ptr t;
|
||||
I2CByte a;
|
||||
|
||||
t = xcalloc(1, sizeof(UDA1380Rec));
|
||||
t = calloc(1, sizeof(UDA1380Rec));
|
||||
if(t == NULL) return NULL;
|
||||
switch(addr)
|
||||
{
|
||||
|
|
@ -58,14 +58,14 @@ UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr)
|
|||
|
||||
if(!I2C_WriteRead(&(t->d), NULL, 0, &a, 1))
|
||||
{
|
||||
xfree(t);
|
||||
free(t);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* set default parameters */
|
||||
if(!I2CDevInit(&(t->d)))
|
||||
{
|
||||
xfree(t);
|
||||
free(t);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue