mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
xalloc+memset(0) -> xcalloc
This commit is contained in:
parent
0b7b89fbac
commit
8a5b89e8e1
43 changed files with 68 additions and 179 deletions
|
|
@ -295,11 +295,10 @@ autoConfigDevice(GDevPtr preconf_device)
|
|||
if (preconf_device) {
|
||||
ptr = preconf_device;
|
||||
} else {
|
||||
ptr = (GDevPtr)xalloc(sizeof(GDevRec));
|
||||
ptr = xcalloc(1, sizeof(GDevRec));
|
||||
if (!ptr) {
|
||||
return NULL;
|
||||
}
|
||||
memset((GDevPtr)ptr, 0, sizeof(GDevRec));
|
||||
ptr->chipID = -1;
|
||||
ptr->chipRev = -1;
|
||||
ptr->irq = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue