[PATCH 3/4] Replace deprecated bzero with memset

Mikhail Gusarov dottedmag at dottedmag.net
Fri Jun 4 01:52:41 PDT 2010


Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
 Xext/panoramiXprocs.c                    |    4 +-
 Xext/xace.c                              |    2 +-
 dix/colormap.c                           |   12 +++---
 dix/dispatch.c                           |    2 +-
 dix/dixfonts.c                           |    2 +-
 dix/events.c                             |    4 +-
 hw/vfb/InitOutput.c                      |    2 +-
 hw/xfree86/common/xf86Bus.c              |    2 +-
 hw/xfree86/common/xf86Config.c           |    8 ++--
 hw/xfree86/common/xf86Cursor.c           |    2 +-
 hw/xfree86/common/xf86Helper.c           |    2 +-
 hw/xfree86/common/xf86Init.c             |    4 +-
 hw/xfree86/os-support/solaris/sun_bell.c |    2 +-
 hw/xfree86/vbe/vbe.c                     |    4 +-
 mi/miarc.c                               |    4 +-
 miext/cw/cw.c                            |    2 +-
 os/access.c                              |    4 +-
 os/connection.c                          |    2 +-
 os/utils.c                               |    4 +-
 os/xdmauth.c                             |    2 +-
 os/xdmcp.c                               |    6 ++--
 record/record.c                          |    6 ++--
 xkb/XKBAlloc.c                           |    4 +-
 xkb/XKBGAlloc.c                          |   18 +++++-----
 xkb/XKBMAlloc.c                          |   40 +++++++++++-----------
 xkb/XKBMisc.c                            |    4 +-
 xkb/maprules.c                           |   22 ++++++------
 xkb/xkb.c                                |   52 +++++++++++++++---------------
 xkb/xkbActions.c                         |    2 +-
 xkb/xkbLEDs.c                            |   24 +++++++-------
 xkb/xkbUtils.c                           |   10 +++---
 xkb/xkmread.c                            |    6 ++--
 32 files changed, 132 insertions(+), 132 deletions(-)

diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 5ccbe27..6f6fcd8 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -1900,7 +1900,7 @@ int PanoramiXGetImage(ClientPtr client)
 	    nlines = min(linesPerBuf, h - linesDone);
 
 	    if(pDraw->depth == 1)
-		bzero(pBuf, nlines * widthBytesLine);
+		memset(pBuf, 0, nlines * widthBytesLine);
 
 	    XineramaGetImageData(drawables, x, y + linesDone, w, nlines,
 			format, planemask, pBuf, widthBytesLine, isRoot);
@@ -1917,7 +1917,7 @@ int PanoramiXGetImage(ClientPtr client)
 	        while (h - linesDone > 0) {
 		    nlines = min(linesPerBuf, h - linesDone);
 
-		    bzero(pBuf, nlines * widthBytesLine);
+		    memset(pBuf, 0, nlines * widthBytesLine);
 
 		    XineramaGetImageData(drawables, x, y + linesDone, w, 
 					nlines, format, plane, pBuf,
diff --git a/Xext/xace.c b/Xext/xace.c
index 53f4b4d..9395730 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -324,7 +324,7 @@ XaceCensorImage(
 	    /* Censoring was not completed above.  To be safe, wipe out
 	     * all the image data so that nothing trusted gets out.
 	     */
-	    bzero(pBuf, (int)(widthBytesLine * h));
+	    memset(pBuf, 0, (int)(widthBytesLine * h));
 	}
 	if (pRects)     free(pRects);
 	if (pScratchGC) FreeScratchGC(pScratchGC);
diff --git a/dix/colormap.c b/dix/colormap.c
index 12197ac..b10727d 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -298,8 +298,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
     if ((class | DynamicClass) == DirectColor)
 	size = NUMRED(pVisual);
     pmap->freeRed = size;
-    bzero ((char *) pmap->red, (int)sizebytes);
-    bzero((char *) pmap->numPixelsRed, MAXCLIENTS * sizeof(int));
+    memset((char *) pmap->red, 0, (int)sizebytes);
+    memset((char *) pmap->numPixelsRed, 0, MAXCLIENTS * sizeof(int));
     for (pptr = &pmap->clientPixelsRed[MAXCLIENTS]; --pptr >= pmap->clientPixelsRed; )
 	*pptr = (Pixel *)NULL;
     if (alloc == AllocAll)
@@ -336,8 +336,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
 	pmap->numPixelsBlue = (int *)((char *)pmap->clientPixelsBlue +
 				      (MAXCLIENTS * sizeof(Pixel *)));
 
-	bzero ((char *) pmap->green, (int)sizebytes);
-	bzero ((char *) pmap->blue, (int)sizebytes);
+	memset((char *) pmap->green, 0, (int)sizebytes);
+	memset((char *) pmap->blue, 0, (int)sizebytes);
 
 	memmove((char *) pmap->clientPixelsGreen,
 		(char *) pmap->clientPixelsRed,
@@ -345,8 +345,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
 	memmove((char *) pmap->clientPixelsBlue,
 		(char *) pmap->clientPixelsRed,
 	      MAXCLIENTS * sizeof(Pixel *));
-	bzero((char *) pmap->numPixelsGreen, MAXCLIENTS * sizeof(int));
-	bzero((char *) pmap->numPixelsBlue, MAXCLIENTS * sizeof(int));
+	memset((char *) pmap->numPixelsGreen, 0, MAXCLIENTS * sizeof(int));
+	memset((char *) pmap->numPixelsBlue, 0, MAXCLIENTS * sizeof(int));
 
 	/* If every cell is allocated, mark its refcnt */
 	if (alloc == AllocAll)
diff --git a/dix/dispatch.c b/dix/dispatch.c
index c0efce5..4015247 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -2974,7 +2974,7 @@ ProcCreateCursor (ClientPtr client)
     else
     {
 	/* zeroing the (pad) bits helps some ddx cursor handling */
-	bzero((char *)mskbits, n);
+	memset((char *)mskbits, 0, n);
 	(* msk->drawable.pScreen->GetImage)( (DrawablePtr)msk, 0, 0, width,
 					height, XYPixmap, 1, (pointer)mskbits);
     }
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index b6d54f8..51c7ab6 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1093,7 +1093,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
     }
 finish:
     length = sizeof(xListFontsWithInfoReply);
-    bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply));
+    memset((char *) &finalReply, 0, sizeof(xListFontsWithInfoReply));
     finalReply.type = X_Reply;
     finalReply.sequenceNumber = client->sequence;
     finalReply.length = bytes_to_int32(sizeof(xListFontsWithInfoReply)
diff --git a/dix/events.c b/dix/events.c
index 502eebd..d29cf99 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4317,7 +4317,7 @@ CoreEnterLeaveEvent(
         xKeymapEvent ke;
         ClientPtr client = grab ? rClient(grab) : wClient(pWin);
         if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess))
-            bzero((char *)&ke.map[0], 31);
+            memset((char *)&ke.map[0], 0, 31);
         else
             memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31);
 
@@ -4427,7 +4427,7 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
         xKeymapEvent ke;
         ClientPtr client = wClient(pWin);
         if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess))
-            bzero((char *)&ke.map[0], 31);
+            memset((char *)&ke.map[0], 0, 31);
         else
             memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
 
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 0f0edb2..b720da9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -570,7 +570,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
 
     /* Extend the file to be the proper size */
 
-    bzero(dummyBuffer, DUMMY_BUFFER_SIZE);
+    memset(dummyBuffer, 0, DUMMY_BUFFER_SIZE);
     for (currentFileSize = 0;
 	 currentFileSize < pvfb->sizeInBytes;
 	 currentFileSize += writeThisTime)
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 8276257..7876ba9 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -654,7 +654,7 @@ xf86AllocateEntityPrivateIndex(void)
 	nprivs = xnfrealloc(pEnt->entityPrivates,
 			    xf86EntityPrivateCount * sizeof(DevUnion));
 	/* Zero the new private */
-	bzero(&nprivs[idx], sizeof(DevUnion));
+	memset(&nprivs[idx], 0, sizeof(DevUnion));
 	pEnt->entityPrivates = nprivs;
     }
     return idx;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 7acb6af..c7a68e5 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1252,7 +1252,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
 
     /* 5. Built-in default. */
     if (!foundPointer && !xf86Info.allowEmptyInput) {
-	bzero(&defPtr, sizeof(defPtr));
+	memset(&defPtr, 0, sizeof(defPtr));
 	defPtr.inp_identifier = strdup("<default pointer>");
 	defPtr.inp_driver = strdup("mouse");
 	confInput = &defPtr;
@@ -1303,7 +1303,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
     if (!found && !xf86Info.allowEmptyInput) {
 	xf86Msg(X_INFO, "No default mouse found, adding one\n");
-	bzero(&defPtr, sizeof(defPtr));
+	memset(&defPtr, 0, sizeof(defPtr));
 	defPtr.inp_identifier = strdup("<default pointer>");
 	defPtr.inp_driver = strdup("mouse");
 	confInput = &defPtr;
@@ -1392,7 +1392,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
 
     /* 5. Built-in default. */
     if (!foundKeyboard && !xf86Info.allowEmptyInput) {
-	bzero(&defKbd, sizeof(defKbd));
+	memset(&defKbd, 0, sizeof(defKbd));
 	defKbd.inp_identifier = strdup("<default keyboard>");
 	defKbd.inp_driver = strdup("kbd");
 	confInput = &defKbd;
@@ -1851,7 +1851,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
     if (!conf_screen->scrn_monitor) {
 	XF86ConfMonitorRec defMon;
 
-	bzero(&defMon, sizeof(defMon));
+	memset(&defMon, 0, sizeof(defMon));
 	defMon.mon_identifier = "<default monitor>";
 	if (!configMonitor(screenp->monitor, &defMon))
 	    return FALSE;
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 714743a..f6c5633 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -590,7 +590,7 @@ xf86InitOrigins(void)
     /* need to have this set up with a config file option */
     HardEdges = FALSE;
 
-    bzero(xf86ScreenLayout, MAXSCREENS * sizeof(xf86ScreenLayoutRec));
+    memset(xf86ScreenLayout, 0, MAXSCREENS * sizeof(xf86ScreenLayoutRec));
 	
     screensLeft = prevScreensLeft = (1 << xf86NumScreens) - 1;
 
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1aad2d1..778692c 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -269,7 +269,7 @@ xf86AllocateScrnInfoPrivateIndex(void)
 	nprivs = xnfrealloc(pScr->privates,
 			    xf86ScrnInfoPrivateCount * sizeof(DevUnion));
 	/* Zero the new private */
-	bzero(&nprivs[idx], sizeof(DevUnion));
+	memset(&nprivs[idx], 0, sizeof(DevUnion));
 	pScr->privates = nprivs;
     }
     return idx;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index db88f70..e9b1077 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -202,8 +202,8 @@ xf86PrintBanner(void)
     struct tm t;
     char buf[100];
 
-    bzero(&t, sizeof(t));
-    bzero(buf, sizeof(buf));
+    memset(&t, 0, sizeof(t));
+    memset(buf, 0, sizeof(buf));
     t.tm_mday = BUILD_DATE % 100;
     t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
     t.tm_year = BUILD_DATE / 10000 - 1900;
diff --git a/hw/xfree86/os-support/solaris/sun_bell.c b/hw/xfree86/os-support/solaris/sun_bell.c
index 05d1749..bab3913 100644
--- a/hw/xfree86/os-support/solaris/sun_bell.c
+++ b/hw/xfree86/os-support/solaris/sun_bell.c
@@ -64,7 +64,7 @@ xf86OSRingBell(int loudness, int pitch, int duration)
     }
 
     lastFreq = 0;
-    bzero(silence, sizeof(silence));
+    memset(silence, 0, sizeof(silence));
 
     audioFD = open(AUDIO_DEVICE, O_WRONLY | O_NONBLOCK);
     if (audioFD == -1) {
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 3840bfe..2ace752 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -345,7 +345,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
     char *str;
     CARD16 major, *modes;
 
-    bzero(pVbe->memory, sizeof(VbeInfoBlock));
+    memset(pVbe->memory, 0, sizeof(VbeInfoBlock));
 
     /*
     Input:
@@ -504,7 +504,7 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
 {
     VbeModeInfoBlock *block = NULL;
 
-    bzero(pVbe->memory, sizeof(VbeModeInfoBlock));
+    memset(pVbe->memory, 0, sizeof(VbeModeInfoBlock));
 
     /*
     Input:
diff --git a/mi/miarc.c b/mi/miarc.c
index 7e8ec1f..5143d2a 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -3135,9 +3135,9 @@ realFindSpan (int y)
 			free(finalSpans);
 		}
 		if ((i = finalMiny - newMiny) > 0)
-			bzero ((char *)newSpans, i * sizeof (struct finalSpan *));
+			memset((char *)newSpans, 0, i * sizeof (struct finalSpan *));
 		if ((i = newMaxy - finalMaxy) > 0)
-			bzero ((char *)(newSpans + newSize - i),
+			memset((char *)(newSpans + newSize - i), 0,
 			       i * sizeof (struct finalSpan *));
 		finalSpans = newSpans;
 		finalMaxy = newMaxy;
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index 2d8fd12..24cb257 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -328,7 +328,7 @@ cwCreateGC(GCPtr pGC)
     ScreenPtr	pScreen = pGC->pScreen;
     Bool	ret;
 
-    bzero(pPriv, sizeof(cwGCRec));
+    memset(pPriv, 0, sizeof(cwGCRec));
     SCREEN_PROLOGUE(pScreen, CreateGC);
 
     if ( (ret = (*pScreen->CreateGC)(pGC)) )
diff --git a/os/access.c b/os/access.c
index 2473ba4..36e1b81 100644
--- a/os/access.c
+++ b/os/access.c
@@ -311,7 +311,7 @@ ifioctl (int fd, int cmd, char *arg)
     struct strioctl ioc;
     int ret;
 
-    bzero((char *) &ioc, sizeof(ioc));
+    memset((char *) &ioc, 0, sizeof(ioc));
     ioc.ic_cmd = cmd;
     ioc.ic_timout = 0;
     if (cmd == SIOCGIFCONF)
@@ -1038,7 +1038,7 @@ ResetHosts (char *display)
 		len = sizeof(saddr.sa);
 		if (ConvertAddr (&saddr.sa, &len, (pointer *)&addr) == FamilyDECnet)
 		{
-		    bzero ((char *) &dnaddr, sizeof (dnaddr));
+		    memset((char *) &dnaddr, 0, sizeof (dnaddr));
 		    dnaddr.a_len = np->n_length;
 		    acopy (np->n_addr, dnaddr.a_addr, np->n_length);
 		    dnaddrp = &dnaddr;
diff --git a/os/connection.c b/os/connection.c
index bbcfa51..293f31a 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -183,7 +183,7 @@ struct _ct_node *ct_head[256];
 
 void InitConnectionTranslation(void)
 {
-    bzero(ct_head, sizeof(ct_head));
+    memset(ct_head, 0, sizeof(ct_head));
 }
 
 int GetConnectionTranslation(int conn)
diff --git a/os/utils.c b/os/utils.c
index 7aa392a..b4a954f 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -979,7 +979,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client)
 
 	gethostname(hname, 1024);
 #if defined(IPv6) && defined(AF_INET6)
-	bzero(&hints, sizeof(hints));
+	memset(&hints, 0, sizeof(hints));
 	hints.ai_flags = AI_CANONNAME;
 	if (getaddrinfo(hname, NULL, &hints, &ai) == 0) {
 	    hnameptr = ai->ai_canonname;
@@ -1178,7 +1178,7 @@ SmartScheduleInit (void)
     if (SmartScheduleDisable)
 	return TRUE;
     
-    bzero ((char *) &act, sizeof(struct sigaction));
+    memset((char *) &act, 0, sizeof(struct sigaction));
 
     /* Set up the timer signal function */
     act.sa_handler = SmartScheduleTimer;
diff --git a/os/xdmauth.c b/os/xdmauth.c
index 31c1b4c..b8cbada 100644
--- a/os/xdmauth.c
+++ b/os/xdmauth.c
@@ -139,7 +139,7 @@ HexToBinary (const char *in, char *out, int len)
 void
 XdmAuthenticationInit (const char *cookie, int cookie_len)
 {
-    bzero (privateKey.data, 8);
+    memset(privateKey.data, 0, 8);
     if (!strncmp (cookie, "0x", 2) || !strncmp (cookie, "0X", 2))
     {
 	if (cookie_len > 2 + 2 * 8)
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 38b2197..e03f17e 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -338,7 +338,7 @@ XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr)
     if (NumBroadcastAddresses >= MAX_BROADCAST)
 	return;
     bcast = &BroadcastAddresses[NumBroadcastAddresses++];
-    bzero (bcast, sizeof (struct sockaddr_in));
+    memset(bcast, 0, sizeof (struct sockaddr_in));
 #ifdef BSD44SOCKETS
     bcast->sin_len = addr->sin_len;
 #endif
@@ -1483,7 +1483,7 @@ get_addr_by_name(
     char *pport = portstr;
     int gaierr;
 
-    bzero(&hints, sizeof(hints));
+    memset(&hints, 0, sizeof(hints));
     hints.ai_socktype = socktype;
 
     if (port == 0) {
@@ -1616,7 +1616,7 @@ get_mcast_options(int argc, char **argv, int i)
     } else {
 	FatalError("Xserver: port out of range: %d\n", xdm_udp_port);
     }
-    bzero(&hints, sizeof(hints));
+    memset(&hints, 0, sizeof(hints));
     hints.ai_socktype = SOCK_DGRAM;
 
     if ((gaierr = getaddrinfo(address, portstr, &hints, &firstai)) == 0) {
diff --git a/record/record.c b/record/record.c
index 46231c9..10ca73c 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1495,7 +1495,7 @@ RecordAllocIntervals(SetInfoPtr psi, int nIntervals)
 			malloc(nIntervals * sizeof(RecordSetInterval));
     if (!psi->intervals)
 	return BadAlloc;
-    bzero(psi->intervals, nIntervals * sizeof(RecordSetInterval));
+    memset(psi->intervals, 0, nIntervals * sizeof(RecordSetInterval));
     psi->size = nIntervals;
     return Success;
 } /* end RecordAllocIntervals */
@@ -1669,7 +1669,7 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegist
 	err = BadAlloc;
 	goto bailout;
     }
-    bzero(si, sizeof(SetInfoRec) * maxSets);
+    memset(si, 0, sizeof(SetInfoRec) * maxSets);
 
     /* theoretically you must do this because NULL may not be all-bits-zero */
     for (i = 0; i < maxSets; i++)
@@ -2053,7 +2053,7 @@ RecordAllocRanges(GetContextRangeInfoPtr pri, int nRanges)
 
     pri->pRanges = pNewRange;
     pri->size = newsize;
-    bzero(&pri->pRanges[pri->size - SZINCR], SZINCR * sizeof(xRecordRange));
+    memset(&pri->pRanges[pri->size - SZINCR], 0, SZINCR * sizeof(xRecordRange));
     if (pri->nRanges < nRanges)
 	pri->nRanges = nRanges;
     return Success;
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index 0e3c6f4..c52e091 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -82,7 +82,7 @@ XkbSymInterpretRec *prev_interpret;
     }
     compat->size_si= nSI;
     compat->num_si= 0;
-    bzero((char *)&compat->groups[0],XkbNumKbdGroups*sizeof(XkbModsRec));
+    memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
     xkb->compat= compat;
     return Success;
 }
@@ -99,7 +99,7 @@ register XkbCompatMapPtr compat;
     if (freeMap)
 	which= XkbAllCompatMask;
     if (which&XkbGroupCompatMask)
-	bzero((char *)&compat->groups[0],XkbNumKbdGroups*sizeof(XkbModsRec));
+	memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
     if (which&XkbSymInterpMask) {
 	if ((compat->sym_interpret)&&(compat->size_si>0))
 	    free(compat->sym_interpret);
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 7a3659f..f155cc8 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -478,7 +478,7 @@ _XkbGeomAlloc(	void **		old,
 
     if (*num>0) {
 	char *tmp= (char *)(*old);
-	bzero(&tmp[sz_elem*(*num)],(num_new*sz_elem));
+	memset(&tmp[sz_elem*(*num)], 0, (num_new*sz_elem));
     }
     return Success;
 }
@@ -701,7 +701,7 @@ register XkbKeyAliasPtr alias;
 	return NULL;
     for (i=0,alias=geom->key_aliases;i<geom->num_key_aliases;i++,alias++) {
 	if (strncmp(alias->alias,aliasStr,XkbKeyNameLength)==0) {
-	    bzero(alias->real,XkbKeyNameLength);
+	    memset(alias->real, 0, XkbKeyNameLength);
 	    strncpy(alias->real,realStr,XkbKeyNameLength);
 	    return alias;
 	}
@@ -711,7 +711,7 @@ register XkbKeyAliasPtr alias;
 	return NULL;
     }
     alias= &geom->key_aliases[geom->num_key_aliases];
-    bzero(alias,sizeof(XkbKeyAliasRec));
+    memset(alias, 0, sizeof(XkbKeyAliasRec));
     strncpy(alias->alias,aliasStr,XkbKeyNameLength);
     strncpy(alias->real,realStr,XkbKeyNameLength);
     geom->num_key_aliases++;
@@ -758,7 +758,7 @@ XkbOutlinePtr	outline;
 	return NULL;
     }
     outline= &shape->outlines[shape->num_outlines];
-    bzero(outline,sizeof(XkbOutlineRec));
+    memset(outline, 0, sizeof(XkbOutlineRec));
     if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
 	return NULL;
     shape->num_outlines++;
@@ -783,7 +783,7 @@ register int	i;
 					(_XkbAllocShapes(geom,1)!=Success))
 	return NULL;
     shape= &geom->shapes[geom->num_shapes];
-    bzero(shape,sizeof(XkbShapeRec));
+    memset(shape, 0, sizeof(XkbShapeRec));
     if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
 	return NULL;
     shape->name= name;
@@ -801,7 +801,7 @@ XkbKeyPtr	key;
     if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
 	return NULL;
     key= &row->keys[row->num_keys++];
-    bzero(key,sizeof(XkbKeyRec));
+    memset(key, 0, sizeof(XkbKeyRec));
     return key;
 }
 
@@ -816,7 +816,7 @@ XkbRowPtr	row;
     					(_XkbAllocRows(section,1)!=Success))
 	return NULL;
     row= &section->rows[section->num_rows];
-    bzero(row,sizeof(XkbRowRec));
+    memset(row, 0, sizeof(XkbRowRec));
     if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
 	return NULL;
     section->num_rows++;
@@ -896,7 +896,7 @@ register int	i,nDoodads;
 	    return NULL;
 	doodad= &geom->doodads[geom->num_doodads++];
     }
-    bzero(doodad,sizeof(XkbDoodadRec));
+    memset(doodad, 0, sizeof(XkbDoodadRec));
     doodad->any.name= name;
     return doodad;
 }
@@ -960,7 +960,7 @@ XkbOverlayRowPtr	row;
 				(_XkbAllocOverlayRows(overlay,1)!=Success))
 	return NULL;
     row= &overlay->rows[overlay->num_rows];
-    bzero(row,sizeof(XkbOverlayRowRec));
+    memset(row, 0, sizeof(XkbOverlayRowRec));
     if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
 	return NULL;
     row->row_under= row_under;
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
index 27151b8..abe0018 100644
--- a/xkb/XKBMAlloc.c
+++ b/xkb/XKBMAlloc.c
@@ -84,7 +84,7 @@ XkbClientMapPtr map;
 		return BadAlloc;
 	    }
 	    map->size_types= nTotalTypes;
-	    bzero(&map->types[map->num_types], 
+	    memset(&map->types[map->num_types], 0,
 		  ((map->size_types-map->num_types)*sizeof(XkbKeyTypeRec)));
 	}
     }
@@ -177,7 +177,7 @@ XkbServerMapPtr map;
 	        return BadAlloc;
 	    }
 	    map->size_acts= need;
-	    bzero(&map->acts[map->num_acts], 
+	    memset(&map->acts[map->num_acts], 0,
 		    ((map->size_acts-map->num_acts)*sizeof(XkbAction)));
 	}
 	if (map->key_acts==NULL) {
@@ -368,7 +368,7 @@ KeyCode		matchingKeys[XkbMaxKeyCount],nMatchingKeys;
      * The possibilities marked with '+' require us to examine the key types
      * associated with each group for the key.
      */
-    bzero(matchingKeys,XkbMaxKeyCount*sizeof(KeyCode));
+    memset(matchingKeys, 0, XkbMaxKeyCount*sizeof(KeyCode));
     nMatchingKeys= 0;
     if (new_num_lvls>type->num_levels) {
 	int	 		nTotal;
@@ -461,7 +461,7 @@ KeyCode		matchingKeys[XkbMaxKeyCount],nMatchingKeys;
 	    for (g=XkbKeyNumGroups(xkb,key)-1;g>=0;g--) {
 		if (XkbKeyKeyTypeIndex(xkb,key,g)==type_ndx) {
 		    if (nClear>0)
-			bzero(&pSyms[g*width+firstClear],nClear*sizeof(KeySym));
+			memset(&pSyms[g*width+firstClear], 0, nClear*sizeof(KeySym));
 		}
 	    }
 	}
@@ -491,8 +491,8 @@ KeySym	*newSyms;
 						nOldSyms*sizeof(KeySym));
 	}
 	if ((needed-nOldSyms)>0) {
-	    bzero(&xkb->map->syms[xkb->map->num_syms+XkbKeyNumSyms(xkb,key)],
-					(needed-nOldSyms)*sizeof(KeySym));
+	    memset(&xkb->map->syms[xkb->map->num_syms+XkbKeyNumSyms(xkb, key)],
+                   0, (needed-nOldSyms)*sizeof(KeySym));
 	}
 	xkb->map->key_sym_map[key].offset = xkb->map->num_syms;
 	xkb->map->num_syms+= needed;
@@ -515,7 +515,7 @@ KeySym	*newSyms;
 	if (nCopy!=0)
 	   memcpy(&newSyms[nSyms],XkbKeySymsPtr(xkb,i),nCopy*sizeof(KeySym));
 	if (nKeySyms>nCopy)
-	    bzero(&newSyms[nSyms+nCopy],(nKeySyms-nCopy)*sizeof(KeySym));
+	    memset(&newSyms[nSyms+nCopy], 0, (nKeySyms-nCopy)*sizeof(KeySym));
 	xkb->map->key_sym_map[i].offset = nSyms;
 	nSyms+= nKeySyms;
     }
@@ -568,7 +568,7 @@ int	tmp;
 	tmp= xkb->min_key_code-minKC;
 	if (xkb->map)  {
 	    if (xkb->map->key_sym_map) {
-		bzero((char *)&xkb->map->key_sym_map[minKC],
+		memset((char *)&xkb->map->key_sym_map[minKC], 0,
 					tmp*sizeof(XkbSymMapRec));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -578,7 +578,7 @@ int	tmp;
 		}
 	    }
 	    if (xkb->map->modmap) {
-		bzero((char *)&xkb->map->modmap[minKC],tmp);
+		memset((char *)&xkb->map->modmap[minKC], 0, tmp);
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
 		    				XkbModifierMapMask,minKC,
@@ -589,7 +589,7 @@ int	tmp;
 	}
 	if (xkb->server) {
 	    if (xkb->server->behaviors) {
-		bzero((char *)&xkb->server->behaviors[minKC],
+		memset((char *)&xkb->server->behaviors[minKC], 0,
 						tmp*sizeof(XkbBehavior));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -599,7 +599,7 @@ int	tmp;
 		}
 	    }
 	    if (xkb->server->key_acts) {
-		bzero((char *)&xkb->server->key_acts[minKC],
+		memset((char *)&xkb->server->key_acts[minKC], 0,
 						tmp*sizeof(unsigned short));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -609,7 +609,7 @@ int	tmp;
 		}
 	    }
 	    if (xkb->server->vmodmap) {
-		bzero((char *)&xkb->server->vmodmap[minKC],
+		memset((char *)&xkb->server->vmodmap[minKC], 0,
 						tmp*sizeof(unsigned short));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -620,7 +620,7 @@ int	tmp;
 	    }
 	}
 	if ((xkb->names)&&(xkb->names->keys)) {
-	    bzero((char *)&xkb->names->keys[minKC],tmp*sizeof(XkbKeyNameRec));
+	    memset((char *)&xkb->names->keys[minKC], 0, tmp*sizeof(XkbKeyNameRec));
 	    if (changes) {
 		changes->names.changed= _ExtendRange(changes->names.changed,
 					XkbKeyNamesMask,minKC,
@@ -644,7 +644,7 @@ int	tmp;
 		    free(prev_key_sym_map);
 		    return BadAlloc;
 		}
-		bzero((char *)&xkb->map->key_sym_map[xkb->max_key_code],
+		memset((char *)&xkb->map->key_sym_map[xkb->max_key_code], 0,
 					tmp*sizeof(XkbSymMapRec));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -662,7 +662,7 @@ int	tmp;
 		    free(prev_modmap);
 		    return BadAlloc;
 		}
-		bzero((char *)&xkb->map->modmap[xkb->max_key_code],tmp);
+		memset((char *)&xkb->map->modmap[xkb->max_key_code], 0, tmp);
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
 		    				XkbModifierMapMask,maxKC,
@@ -681,7 +681,7 @@ int	tmp;
 		    free(prev_behaviors);
 		    return BadAlloc;
 		}
-		bzero((char *)&xkb->server->behaviors[xkb->max_key_code],
+		memset((char *)&xkb->server->behaviors[xkb->max_key_code], 0,
 						tmp*sizeof(XkbBehavior));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -699,7 +699,7 @@ int	tmp;
 		    free(prev_key_acts);
 		    return BadAlloc;
 		}
-		bzero((char *)&xkb->server->key_acts[xkb->max_key_code],
+		memset((char *)&xkb->server->key_acts[xkb->max_key_code], 0,
 						tmp*sizeof(unsigned short));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -717,7 +717,7 @@ int	tmp;
 		    free(prev_vmodmap);
 		    return BadAlloc;
 		}
-		bzero((char *)&xkb->server->vmodmap[xkb->max_key_code],
+		memset((char *)&xkb->server->vmodmap[xkb->max_key_code], 0,
 						tmp*sizeof(unsigned short));
 		if (changes) {
 		    changes->map.changed= _ExtendRange(changes->map.changed,
@@ -736,7 +736,7 @@ int	tmp;
 		free(prev_keys);
 		return BadAlloc;
 	    }
-	    bzero((char *)&xkb->names->keys[xkb->max_key_code],
+	    memset((char *)&xkb->names->keys[xkb->max_key_code], 0,
 	    					tmp*sizeof(XkbKeyNameRec));
 	    if (changes) {
 		changes->names.changed= _ExtendRange(changes->names.changed,
@@ -790,7 +790,7 @@ XkbAction *newActs;
 	    memcpy(&newActs[nActs],XkbKeyActionsPtr(xkb,i),
 						nCopy*sizeof(XkbAction));
 	if (nCopy<nKeyActs)
-	    bzero(&newActs[nActs+nCopy],(nKeyActs-nCopy)*sizeof(XkbAction));
+	    memset(&newActs[nActs+nCopy], 0, (nKeyActs-nCopy)*sizeof(XkbAction));
 	xkb->server->key_acts[i]= nActs;
 	nActs+= nKeyActs;
     }
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index ee3dfcc..efe2911 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -580,7 +580,7 @@ int		width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
 	pSyms= XkbResizeKeySyms(xkb,key,width*nGroups);
 	if (pSyms==NULL)
 	    return BadAlloc;
-	bzero(pSyms,width*nGroups*sizeof(KeySym));
+	memset(pSyms, 0, width*nGroups*sizeof(KeySym));
 	for (i=0;(i<nGroups)&&(i<nOldGroups);i++) {
 	    pOldType= XkbKeyKeyType(xkb,key,i);
 	    pNewType= &xkb->map->types[newTypes[i]];
@@ -596,7 +596,7 @@ int		width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
 	    pActs= XkbResizeKeyActions(xkb,key,width*nGroups);
 	    if (pActs==NULL)
 		return BadAlloc;
-	    bzero(pActs,width*nGroups*sizeof(XkbAction));
+	    memset(pActs, 0, width*nGroups*sizeof(XkbAction));
 	    for (i=0;(i<nGroups)&&(i<nOldGroups);i++) {
 		pOldType= XkbKeyKeyType(xkb,key,i);
 		pNewType= &xkb->map->types[newTypes[i]];
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 3b15a47..5aabd1c 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -270,7 +270,7 @@ Bool		found;
    l_ndx_present = v_ndx_present = present= 0;
    str= &line->line[1];
    len = remap->number;
-   bzero((char *)remap,sizeof(RemapSpec));
+   memset((char *)remap, 0, sizeof(RemapSpec));
    remap->number = len;
    while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
 	found= FALSE;
@@ -412,7 +412,7 @@ Bool 		append = FALSE;
 	DebugF("Illegal line of data ignored\n");
 	return FALSE;
     }
-    bzero((char *)&tmp,sizeof(FileSpec));
+    memset((char *)&tmp, 0, sizeof(FileSpec));
     str= line->line;
     for (nread= 0;(tok=_XStrtok(str," ",strtok_buf))!=NULL;nread++) {
 	str= NULL;
@@ -495,7 +495,7 @@ static Bool
 MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
 {
 
-   bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec));
+   memset((char *)mdefs, 0, sizeof(XkbRF_MultiDefsRec));
    mdefs->model = defs->model;
    mdefs->options = _XkbDupString(defs->options);
    if (mdefs->options) squeeze_spaces(mdefs->options); 
@@ -834,7 +834,7 @@ XkbRF_GetComponents(	XkbRF_RulesPtr		rules,
 
     MakeMultiDefs(&mdefs, defs);
 
-    bzero((char *)names,sizeof(XkbComponentNamesRec));
+    memset((char *)names, 0, sizeof(XkbComponentNamesRec));
     XkbRF_ClearPartialMatches(rules);
     XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
     XkbRF_ApplyPartialMatches(rules, names);
@@ -876,7 +876,7 @@ XkbRF_AddRule(XkbRF_RulesPtr	rules)
 	DebugF("Allocation failure in XkbRF_AddRule\n");
 	return NULL;
     }
-    bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec));
+    memset((char *)&rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec));
     return &rules->rules[rules->num_rules++];
 }
 
@@ -898,7 +898,7 @@ XkbRF_AddGroup(XkbRF_RulesPtr	rules)
 	return NULL;
     }
 
-    bzero((char *)&rules->groups[rules->num_groups],sizeof(XkbRF_GroupRec));
+    memset((char *)&rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec));
     return &rules->groups[rules->num_groups++];
 }
 
@@ -912,20 +912,20 @@ XkbRF_GroupRec  tgroup,*group;
 
     if (!(rules && file))
 	return FALSE;
-    bzero((char *)&remap,sizeof(RemapSpec));
-    bzero((char *)&tgroup,sizeof(XkbRF_GroupRec));
+    memset((char *)&remap, 0, sizeof(RemapSpec));
+    memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
     InitInputLine(&line);
     while (GetInputLine(file,&line,TRUE)) {
 	if (CheckLine(&line,&remap,&trule,&tgroup)) {
             if (tgroup.number) {
 	        if ((group= XkbRF_AddGroup(rules))!=NULL) {
 		    *group= tgroup;
-		    bzero((char *)&tgroup,sizeof(XkbRF_GroupRec));
+		    memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
 	        }
 	    } else {
 	        if ((rule= XkbRF_AddRule(rules))!=NULL) {
 		    *rule= trule;
-		    bzero((char *)&trule,sizeof(XkbRF_RuleRec));
+		    memset((char *)&trule, 0, sizeof(XkbRF_RuleRec));
 	        }
 	    }
 	}
@@ -997,7 +997,7 @@ XkbRF_GroupPtr	group;
 	    if (rule->types)	free(rule->types);
 	    if (rule->compat)	free(rule->compat);
 	    if (rule->geometry)	free(rule->geometry);
-	    bzero((char *)rule,sizeof(XkbRF_RuleRec));
+	    memset((char *)rule, 0, sizeof(XkbRF_RuleRec));
 	}
 	free(rules->rules);
 	rules->num_rules= rules->sz_rules= 0;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 5a425bd..ae6d941 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -557,7 +557,7 @@ ProcXkbGetState(ClientPtr client)
     CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
 
     xkb= &dev->key->xkbInfo->state;
-    bzero(&rep,sizeof(xkbGetStateReply));
+    memset(&rep, 0, sizeof(xkbGetStateReply));
     rep.type= X_Reply;
     rep.sequenceNumber= client->sequence;
     rep.length = 0;
@@ -1429,7 +1429,7 @@ ProcXkbGetMap(ClientPtr client)
     CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask);
 
     xkb= dev->key->xkbInfo->desc;
-    bzero(&rep,sizeof(xkbGetMapReply));
+    memset(&rep, 0, sizeof(xkbGetMapReply));
     rep.type= X_Reply;
     rep.sequenceNumber= client->sequence;
     rep.length = (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2;
@@ -2172,7 +2172,7 @@ unsigned	 first,last;
 
     first= req->firstKeyBehavior;
     last= req->firstKeyBehavior+req->nKeyBehaviors-1;
-    bzero(&server->behaviors[first],req->nKeyBehaviors*sizeof(XkbBehavior));
+    memset(&server->behaviors[first], 0, req->nKeyBehaviors*sizeof(XkbBehavior));
     for (i=0;i<req->totalKeyBehaviors;i++) {
 	if ((server->behaviors[wire->key].type&XkbKB_Permanent)==0) {
 	    server->behaviors[wire->key].type= wire->type;
@@ -2190,7 +2190,7 @@ unsigned	 first,last;
         else xkbi->radioGroups= calloc(1, sz);
         if (xkbi->radioGroups) {
              if (xkbi->nRadioGroups)
-                bzero(&xkbi->radioGroups[xkbi->nRadioGroups],
+                 memset(&xkbi->radioGroups[xkbi->nRadioGroups], 0,
                         (maxRG-xkbi->nRadioGroups)*sizeof(XkbRadioGroupRec));
              xkbi->nRadioGroups= maxRG;
         }
@@ -2245,7 +2245,7 @@ CARD8 *			start;
     start= wire;
     first= req->firstKeyExplicit;
     last=  req->firstKeyExplicit+req->nKeyExplicit-1;
-    bzero(&xkb->explicit[first],req->nKeyExplicit);
+    memset(&xkb->explicit[first], 0, req->nKeyExplicit);
     for (i=0;i<req->totalKeyExplicit;i++,wire+= 2) {
 	xkb->explicit[wire[0]]= wire[1];
     }
@@ -2279,7 +2279,7 @@ CARD8 *			start;
     start= wire;
     first= req->firstModMapKey;
     last=  req->firstModMapKey+req->nModMapKeys-1;
-    bzero(&xkb->modmap[first],req->nModMapKeys);
+    memset(&xkb->modmap[first], 0, req->nModMapKeys);
     for (i=0;i<req->totalModMapKeys;i++,wire+= 2) {
 	xkb->modmap[wire[0]]= wire[1];
     }
@@ -2311,7 +2311,7 @@ XkbServerMapPtr		srv = xkbi->desc->server;
 
     first= req->firstVModMapKey;
     last=  req->firstVModMapKey+req->nVModMapKeys-1;
-    bzero(&srv->vmodmap[first],req->nVModMapKeys*sizeof(unsigned short));
+    memset(&srv->vmodmap[first], 0, req->nVModMapKeys*sizeof(unsigned short));
     for (i=0;i<req->totalVModMapKeys;i++,wire++) {
 	srv->vmodmap[wire->key]= wire->vmods;
     }
@@ -2438,7 +2438,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
     xkb = xkbi->desc;
 
     XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
-    bzero(&change, sizeof(change));
+    memset(&change, 0, sizeof(change));
     sentNKN = FALSE;
     if ((xkb->min_key_code!=req->minKeyCode)||
         (xkb->max_key_code!=req->maxKeyCode)) {
@@ -2851,7 +2851,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
 	XkbEventCauseRec	cause;
 
 	XkbSetCauseXkbReq(&cause,X_kbSetCompatMap,client);
-	bzero(&change,sizeof(XkbChangesRec));
+	memset(&change, 0, sizeof(XkbChangesRec));
 	XkbUpdateActions(dev,xkb->min_key_code,XkbNumKeys(xkb),&change,&check,
 									&cause);
 	if (check)
@@ -3384,8 +3384,8 @@ _XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev,
         statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led));
     }
 
-    bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify));
-    bzero((char *)&changes,sizeof(XkbChangesRec));
+    memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
+    memset((char *)&changes, 0, sizeof(XkbChangesRec));
     XkbSetCauseXkbReq(&cause,X_kbSetNamedIndicator,client);
     if (namec)
         XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
@@ -4038,7 +4038,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
         return BadAlloc;
     }
 
-    bzero(&nn,sizeof(xkbNamesNotify));
+    memset(&nn, 0, sizeof(xkbNamesNotify));
     nn.changed= stuff->which;
     tmp = (CARD32 *)&stuff[1];
     if (stuff->which&XkbKeycodesNameMask)
@@ -4160,7 +4160,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
                 if (names->indicators[i]!=None)
                     sli->namesPresent|= bit;
             }
-            bzero(&edev,sizeof(xkbExtensionDeviceNotify));
+            memset(&edev, 0, sizeof(xkbExtensionDeviceNotify));
             edev.reason=	XkbXI_IndicatorNamesMask;
             edev.ledClass=	KbdFeedbackClass;
             edev.ledID=		dev->kbdfeed->ctrl.id;
@@ -4478,7 +4478,7 @@ xkbDoodadWireDesc *	doodadWire;
     for (i=0;i<num_doodads;i++,doodad++) {
 	doodadWire= (xkbDoodadWireDesc *)wire;
 	wire= (char *)&doodadWire[1];
-	bzero(doodadWire,SIZEOF(xkbDoodadWireDesc));
+	memset(doodadWire, 0, SIZEOF(xkbDoodadWireDesc));
 	doodadWire->any.name= doodad->any.name;
 	doodadWire->any.type= doodad->any.type;
 	doodadWire->any.priority= doodad->any.priority;
@@ -5290,7 +5290,7 @@ _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
         XkbFreeGeometry(old,XkbGeomAllMask,TRUE);
     if (new_name) {
         xkbNamesNotify	nn;
-        bzero(&nn,sizeof(xkbNamesNotify));
+        memset(&nn, 0, sizeof(xkbNamesNotify));
         nn.changed= XkbGeometryNameMask;
         XkbSendNamesNotify(dev,&nn);
     }
@@ -5497,7 +5497,7 @@ ProcXkbListComponents(ClientPtr client)
 
     status= Success;
     str= (unsigned char *)&stuff[1];
-    bzero(&list,sizeof(XkbSrvListInfoRec));
+    memset(&list, 0, sizeof(XkbSrvListInfoRec));
     list.maxRtrn= stuff->maxNames;
     list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,FALSE,&status);
     list.pattern[_XkbListTypes]= GetComponentSpec(&str,FALSE,&status);
@@ -5516,7 +5516,7 @@ ProcXkbListComponents(ClientPtr client)
 	}
 	return status;
     }
-    bzero(&rep,sizeof(xkbListComponentsReply));
+    memset(&rep, 0, sizeof(xkbListComponentsReply));
     rep.type= X_Reply;
     rep.deviceID = dev->id;
     rep.sequenceNumber = client->sequence;
@@ -5622,7 +5622,7 @@ ProcXkbGetKbdByName(ClientPtr client)
         geom_changed= FALSE;
     }
 
-    bzero(mapFile,PATH_MAX);
+    memset(mapFile, 0, PATH_MAX);
     rep.type= X_Reply;
     rep.deviceID = dev->id;
     rep.sequenceNumber = client->sequence;
@@ -5657,7 +5657,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	if (stuff->load || 
 		((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) {
 	    XkbChangesRec changes;
-	    bzero(&changes,sizeof(changes));
+	    memset(&changes, 0, sizeof(changes));
 	    XkbUpdateDescActions(new,
 			new->min_key_code,XkbNumKeys(new),
 			&changes);
@@ -6121,7 +6121,7 @@ char *			str;
 	wanted&= ~XkbXI_IndicatorsMask;
 
     nameLen= XkbSizeCountedString(dev->name);
-    bzero((char *)&rep,SIZEOF(xkbGetDeviceInfoReply));
+    memset((char *)&rep, 0, SIZEOF(xkbGetDeviceInfoReply));
     rep.type = X_Reply;
     rep.deviceID= dev->id;
     rep.sequenceNumber = client->sequence;
@@ -6329,8 +6329,8 @@ xkbExtensionDeviceNotify	ed;
 XkbChangesRec			changes;
 DeviceIntPtr			kbd;
 
-    bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify));
-    bzero((char *)&changes,sizeof(XkbChangesRec));
+    memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
+    memset((char *)&changes, 0, sizeof(XkbChangesRec));
     XkbSetCauseXkbReq(&cause,X_kbSetDeviceInfo,client);
     ledWire= (xkbDeviceLedsWireDesc *)wire;
     for (i=0;i<num;i++) {
@@ -6351,11 +6351,11 @@ DeviceIntPtr			kbd;
 	atomWire= (CARD32 *)&ledWire[1];
 	if (changed&XkbXI_IndicatorNamesMask) {
 	    namec= sli->namesPresent|ledWire->namesPresent;
-	    bzero((char *)sli->names,XkbNumIndicators*sizeof(Atom));
+	    memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
 	}
 	if (ledWire->namesPresent) {
 	    sli->namesPresent= ledWire->namesPresent;
-	    bzero((char *)sli->names,XkbNumIndicators*sizeof(Atom));
+	    memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
 	    for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
 		if (ledWire->namesPresent&bit) {
 		     sli->names[n]= (Atom)*atomWire;
@@ -6369,7 +6369,7 @@ DeviceIntPtr			kbd;
 	if (changed&XkbXI_IndicatorMapsMask) {
 	    mapc= sli->mapsPresent|ledWire->mapsPresent;
 	    sli->mapsPresent= ledWire->mapsPresent;
-	    bzero((char*)sli->maps,XkbNumIndicators*sizeof(XkbIndicatorMapRec));
+	    memset((char*)sli->maps, 0, XkbNumIndicators*sizeof(XkbIndicatorMapRec));
 	}
 	if (ledWire->mapsPresent) {
 	    for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
@@ -6448,7 +6448,7 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
     char                       *wire;
     xkbExtensionDeviceNotify    ed;
 
-    bzero((char *)&ed,SIZEOF(xkbExtensionDeviceNotify));
+    memset((char *)&ed, 0, SIZEOF(xkbExtensionDeviceNotify));
     ed.deviceID=	dev->id;
     wire= (char *)&stuff[1];
     if (stuff->change&XkbXI_ButtonActionsMask) {
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 0a1a873..a326ab0 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -1033,7 +1033,7 @@ register int	i;
     xkbi->filters= realloc(xkbi->filters,
                             xkbi->szFilters * sizeof(XkbFilterRec));
     /* 6/21/93 (ef) -- XXX! deal with allocation failure */
-    bzero(&xkbi->filters[xkbi->szFilters/2],
+    memset(&xkbi->filters[xkbi->szFilters/2], 0,
             (xkbi->szFilters/2)*sizeof(XkbFilterRec));
     return &xkbi->filters[xkbi->szFilters/2];
 }
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 6097f85..d75f920 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -263,7 +263,7 @@ unsigned			oldState;
 
     if (ed==NULL) {
 	ed= &my_ed;
-	bzero((char *)ed,sizeof(xkbExtensionDeviceNotify));
+	memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify));
     }
     else if ((ed->reason&XkbXI_IndicatorsMask)&&
 	     ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) {
@@ -273,7 +273,7 @@ unsigned			oldState;
     if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) {
 	if (changes==NULL) {
 	    changes= &my_changes;
-	    bzero((char *)changes,sizeof(XkbChangesRec));
+	    memset((char *)changes, 0, sizeof(XkbChangesRec));
 	}
 	changes->indicators.state_changes|= affected;
     }
@@ -362,8 +362,8 @@ XkbChangesRec			changes;
 xkbExtensionDeviceNotify	ed;
 unsigned 			side_affected;
 
-    bzero((char *)&changes,sizeof(XkbChangesRec));
-    bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify));
+    memset((char *)&changes, 0, sizeof(XkbChangesRec));
+    memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
     sli->explicitState&= ~affect;
     sli->explicitState|= (affect&values);
@@ -735,7 +735,7 @@ XkbFlushLedEvents(	DeviceIntPtr			dev,
 	if (changes->indicators.state_changes)
 	    XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
 	XkbSendNotification(kbd,changes,cause);
-	bzero((char *)changes,sizeof(XkbChangesRec));
+	memset((char *)changes, 0, sizeof(XkbChangesRec));
 
 	if (XkbAX_NeedFeedback(kbd->key->xkbInfo->desc->ctrls, XkbAX_IndicatorFBMask)) {
 		if (sli->effectiveState)
@@ -751,7 +751,7 @@ XkbFlushLedEvents(	DeviceIntPtr			dev,
 		XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
 	    XkbSendExtensionDeviceNotify(dev,cause->client,ed);
 	}
-	bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
+	memset((char *)ed, 0, sizeof(XkbExtensionDeviceNotify));
     }
     return;
 }
@@ -778,7 +778,7 @@ xkbExtensionDeviceNotify	my_ed;
 
     if (ed==NULL) {
 	ed= &my_ed;
-	bzero((char *)ed,sizeof(xkbExtensionDeviceNotify));
+	memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify));
     }
     else if ((ed->reason&XkbXI_IndicatorsMask)&&
 	     ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) {
@@ -788,7 +788,7 @@ xkbExtensionDeviceNotify	my_ed;
     if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) { 
 	if (changes==NULL) {
 	   changes= &my_changes;
-	   bzero((char *)changes,sizeof(XkbChangesRec));
+	   memset((char *)changes, 0, sizeof(XkbChangesRec));
 	}
 	changes->names.changed|= XkbIndicatorNamesMask;
 	changes->names.changed_indicators|= changed_names;
@@ -855,7 +855,7 @@ xkbExtensionDeviceNotify	my_ed;
 
     if (ed==NULL) {
 	ed= &my_ed;
-	bzero((char *)ed,sizeof(xkbExtensionDeviceNotify));
+	memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify));
     }
     else if ((ed->reason&XkbXI_IndicatorsMask)&&
 	     ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) {
@@ -865,7 +865,7 @@ xkbExtensionDeviceNotify	my_ed;
     if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) {
 	if (changes==NULL) {
 	    changes= &my_changes;
-	    bzero((char *)changes,sizeof(XkbChangesRec));
+	    memset((char *)changes, 0, sizeof(XkbChangesRec));
 	}
 	changes->indicators.map_changes|= changed_maps;
     }
@@ -917,7 +917,7 @@ Bool				kb_changed;
 
     if (changes==NULL) {
 	changes= &my_changes;
-	bzero((char *)changes,sizeof(XkbChangesRec));
+	memset((char *)changes, 0, sizeof(XkbChangesRec));
     }
 
     kb_changed= FALSE;
@@ -943,7 +943,7 @@ Bool				kb_changed;
 
     if (ed==NULL) {
 	ed= &my_ed;
-	bzero((char *)ed,sizeof(xkbExtensionDeviceNotify));
+	memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify));
     }
     else if (affected&&(ed->reason&XkbXI_IndicatorsMask)&&
 	     ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) {
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index b209edc..a360a84 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -282,7 +282,7 @@ register unsigned	key;
         register  unsigned      bit,i;
         unsigned                present;
 
-        bzero(newVMods,XkbNumVirtualMods);
+        memset(newVMods, 0, XkbNumVirtualMods);
         present= 0;
         for (key=xkb->min_key_code;key<=xkb->max_key_code;key++) {
             if (xkb->server->vmodmap[key]==0)
@@ -588,7 +588,7 @@ XkbSrvInfoPtr	xkbi = dev->key->xkbInfo;
 xkbMapNotify	mn;
 
     xkbi->desc->server->explicit[key]|= XkbExplicitAutoRepeatMask;
-    bzero(&mn,sizeof(mn));
+    memset(&mn, 0, sizeof(mn));
     mn.changed= XkbExplicitComponentsMask;
     mn.firstKeyExplicit= key;
     mn.nKeyExplicit= 1;
@@ -961,7 +961,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst)
                     if (!tmp)
                         return FALSE;
                     dst->map->types = tmp;
-                    bzero(dst->map->types + dst->map->num_types,
+                    memset(dst->map->types + dst->map->num_types, 0,
                           (src->map->num_types - dst->map->num_types) *
                             sizeof(XkbKeyTypeRec));
                 }
@@ -1426,7 +1426,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
             dst->geom->sz_properties = src->geom->num_properties;
 
             if (dst->geom->sz_properties > dst->geom->num_properties) {
-                bzero(dst->geom->properties + dst->geom->num_properties,
+                memset(dst->geom->properties + dst->geom->num_properties, 0,
                       (dst->geom->sz_properties - dst->geom->num_properties) *
                       sizeof(XkbPropertyRec));
             }
@@ -1504,7 +1504,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
             dst->geom->sz_colors = src->geom->num_colors;
 
             if (dst->geom->sz_colors > dst->geom->num_colors) {
-                bzero(dst->geom->colors + dst->geom->num_colors,
+                memset(dst->geom->colors + dst->geom->num_colors, 0,
                       (dst->geom->sz_colors - dst->geom->num_colors) *
                       sizeof(XkbColorRec));
             }
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 5d3372d..814bb1d 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -80,7 +80,7 @@ int	newCount= *newCountRtrn;
 	oldPtr= realloc(oldPtr,newCount*elemSize);
 	if (oldPtr!=NULL) {
 	    char *tmp= (char *)oldPtr;
-	    bzero(&tmp[oldCount*elemSize],(newCount-oldCount)*elemSize);
+	    memset(&tmp[oldCount*elemSize], 0, (newCount-oldCount)*elemSize);
 	}
     }
     else if (newCount<oldCount) {
@@ -725,8 +725,8 @@ int			nRead=0;
 	    return -1;
 	}
 	nRead+= tmp*SIZEOF(xkmKeySymMapDesc);
-	bzero((char *)typeName,XkbNumKbdGroups*sizeof(Atom));
-	bzero((char *)type,XkbNumKbdGroups*sizeof(XkbKeyTypePtr));
+	memset((char *)typeName, 0, XkbNumKbdGroups*sizeof(Atom));
+	memset((char *)type, 0, XkbNumKbdGroups*sizeof(XkbKeyTypePtr));
 	if (wireMap.flags&XkmKeyHasTypes) {
 	    register int g;
 	    for (g=0;g<XkbNumKbdGroups;g++) {
-- 
1.7.1



More information about the xorg-devel mailing list