summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-06-04 15:35:31 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-06-06 15:07:27 +0700
commit5a0fc0ad21d562612676ef88ef2d533b2391810a (patch)
tree6a88d6c9f6194165e08c934f50ac490d8c381ac6 /hw
parentf9810ba914877b379cb36f1b9755f7923ceca14c (diff)
Replace deprecated bzero with memset
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin BaczyƄski <marbacz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/vfb/InitOutput.c2
-rw-r--r--hw/xfree86/common/xf86Bus.c2
-rw-r--r--hw/xfree86/common/xf86Config.c8
-rw-r--r--hw/xfree86/common/xf86Cursor.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86Init.c4
-rw-r--r--hw/xfree86/os-support/solaris/sun_bell.c2
-rw-r--r--hw/xfree86/vbe/vbe.c4
8 files changed, 13 insertions, 13 deletions
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 2f4195582..be8c03607 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 8276257c8..7876ba90e 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 7acb6afaa..c7a68e560 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 714743a8c..f6c56336e 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 7867a428b..ac1f28361 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 18df8c943..98bbd5d2f 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -203,8 +203,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 05d17492a..bab391372 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 3840bfeb4..2ace752c1 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: