mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-04 22:36:10 +00:00
xalloc+memset(0) -> xcalloc
This commit is contained in:
parent
0b7b89fbac
commit
8a5b89e8e1
43 changed files with 68 additions and 179 deletions
|
|
@ -80,8 +80,7 @@ hid_start_parse(report_desc_t d, int kindset)
|
|||
|
||||
_DIAGASSERT(d != NULL);
|
||||
|
||||
s = malloc(sizeof *s);
|
||||
memset(s, 0, sizeof *s);
|
||||
s = calloc(1, sizeof *s);
|
||||
s->start = s->p = d->data;
|
||||
s->end = d->data + d->size;
|
||||
s->kindset = kindset;
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ sparcPromAssignNodes(void)
|
|||
FILE *f;
|
||||
sbusDevicePtr devicePtrs[32];
|
||||
|
||||
(void)memset(devicePtrs, 0, sizeof(devicePtrs));
|
||||
memset(devicePtrs, 0, sizeof(devicePtrs));
|
||||
for (psdpp = xf86SbusInfo, n = 0; (psdp = *psdpp); psdpp++, n++) {
|
||||
if (psdp->fbNum != n)
|
||||
holes = 1;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ linuxPciInit(void)
|
|||
struct stat st;
|
||||
|
||||
#ifndef INCLUDE_XF86_NO_DOMAIN
|
||||
(void) memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO));
|
||||
memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO));
|
||||
#endif
|
||||
|
||||
if (-1 == stat("/proc/bus/pci", &st)) {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
* 64K bytes at a time.
|
||||
*/
|
||||
if (!videoBiosMapped) {
|
||||
(void)memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS);
|
||||
memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS);
|
||||
#ifdef DEBUG
|
||||
ErrorF("Reading BIOS\n");
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -244,8 +244,8 @@ xf86CloseConsole(void)
|
|||
"xf86CloseConsole(): unable to mmap framebuffer"
|
||||
" (%s)\n", strerror(errno));
|
||||
} else {
|
||||
(void)memset(fbdata, 0, fbattr.fbtype.fb_size);
|
||||
(void)munmap(fbdata, fbattr.fbtype.fb_size);
|
||||
memset(fbdata, 0, fbattr.fbtype.fb_size);
|
||||
munmap(fbdata, fbattr.fbtype.fb_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue