mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-22 01:20:26 +00:00
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>
This commit is contained in:
parent
f9810ba914
commit
5a0fc0ad21
32 changed files with 132 additions and 132 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue