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:
@@ -174,7 +174,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
InitProcVectors();
|
||||
for (i=1; i<MAXCLIENTS; i++)
|
||||
clients[i] = NullClient;
|
||||
serverClient = xalloc(sizeof(ClientRec));
|
||||
serverClient = malloc(sizeof(ClientRec));
|
||||
if (!serverClient)
|
||||
FatalError("couldn't create server client");
|
||||
InitClient(serverClient, 0, (pointer)NULL);
|
||||
@@ -314,7 +314,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
FreeDefaultStipple(i);
|
||||
(* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]);
|
||||
dixFreePrivates(screenInfo.screens[i]->devPrivates);
|
||||
xfree(screenInfo.screens[i]);
|
||||
free(screenInfo.screens[i]);
|
||||
screenInfo.numScreens = i;
|
||||
}
|
||||
FreeFonts();
|
||||
@@ -337,7 +337,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
break;
|
||||
}
|
||||
|
||||
xfree(ConnectionInfo);
|
||||
free(ConnectionInfo);
|
||||
ConnectionInfo = NULL;
|
||||
}
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user