mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
xalloc+memset(0) -> xcalloc
This commit is contained in:
parent
0b7b89fbac
commit
8a5b89e8e1
43 changed files with 68 additions and 179 deletions
|
|
@ -287,8 +287,7 @@ configureInputSection (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
mouse = xf86confmalloc(sizeof(XF86ConfInputRec));
|
||||
memset((XF86ConfInputPtr)mouse,0,sizeof(XF86ConfInputRec));
|
||||
mouse = xf86confcalloc(1, sizeof(XF86ConfInputRec));
|
||||
mouse->inp_identifier = "Mouse0";
|
||||
mouse->inp_driver = "mouse";
|
||||
mouse->inp_option_lst =
|
||||
|
|
@ -324,8 +323,7 @@ configureScreenSection (int screennum)
|
|||
{
|
||||
XF86ConfDisplayPtr display;
|
||||
|
||||
display = xf86confmalloc(sizeof(XF86ConfDisplayRec));
|
||||
memset((XF86ConfDisplayPtr)display,0,sizeof(XF86ConfDisplayRec));
|
||||
display = xf86confcalloc(1, sizeof(XF86ConfDisplayRec));
|
||||
display->disp_depth = depths[i];
|
||||
display->disp_black.red = display->disp_white.red = -1;
|
||||
display->disp_black.green = display->disp_white.green = -1;
|
||||
|
|
@ -526,8 +524,7 @@ configureModuleSection (void)
|
|||
for (el = elist; *el; el++) {
|
||||
XF86LoadPtr module;
|
||||
|
||||
module = xf86confmalloc(sizeof(XF86LoadRec));
|
||||
memset((XF86LoadPtr)module,0,sizeof(XF86LoadRec));
|
||||
module = xf86confcalloc(1, sizeof(XF86LoadRec));
|
||||
module->load_name = *el;
|
||||
ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem(
|
||||
(glp)ptr->mod_load_lst, (glp)module);
|
||||
|
|
@ -541,8 +538,7 @@ configureModuleSection (void)
|
|||
for (el = elist; *el; el++) {
|
||||
XF86LoadPtr module;
|
||||
|
||||
module = xf86confmalloc(sizeof(XF86LoadRec));
|
||||
memset((XF86LoadPtr)module,0,sizeof(XF86LoadRec));
|
||||
module = xf86confcalloc(sizeof(XF86LoadRec));
|
||||
module->load_name = *el;
|
||||
|
||||
/* Add only those font backends which are referenced by fontpath */
|
||||
|
|
@ -716,11 +712,7 @@ DoConfigure()
|
|||
xf86FindPrimaryDevice();
|
||||
|
||||
/* Create XF86Config file structure */
|
||||
xf86config = malloc(sizeof(XF86ConfigRec));
|
||||
memset ((XF86ConfigPtr)xf86config, 0, sizeof(XF86ConfigRec));
|
||||
xf86config->conf_device_lst = NULL;
|
||||
xf86config->conf_screen_lst = NULL;
|
||||
xf86config->conf_monitor_lst = NULL;
|
||||
xf86config = calloc(1, sizeof(XF86ConfigRec));
|
||||
|
||||
/* Call all of the probe functions, reporting the results. */
|
||||
for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue