xalloc+memset(0) -> xcalloc

This commit is contained in:
Adam Jackson 2008-10-06 15:36:51 -04:00
commit 8a5b89e8e1
43 changed files with 68 additions and 179 deletions

View file

@ -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;