Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
5413c5ec
Commit
5413c5ec
authored
Sep 12, 2016
by
Mihai Moldovan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc nx-X11/programs/Xserver/{composite,dix,randr}/: switch to using…
misc nx-X11/programs/Xserver/{composite,dix,randr}/: switch to using reallocarray, since it has been ported now.
parent
cd1dcdb2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
62 deletions
+0
-62
compinit.c
nx-X11/programs/Xserver/composite/compinit.c
+0
-10
colormap.c
nx-X11/programs/Xserver/dix/colormap.c
+0
-9
rrcrtc.c
nx-X11/programs/Xserver/randr/rrcrtc.c
+0
-10
rrinfo.c
nx-X11/programs/Xserver/randr/rrinfo.c
+0
-14
rrmode.c
nx-X11/programs/Xserver/randr/rrmode.c
+0
-4
rrmonitor.c
nx-X11/programs/Xserver/randr/rrmonitor.c
+0
-5
rroutput.c
nx-X11/programs/Xserver/randr/rroutput.c
+0
-10
No files found.
nx-X11/programs/Xserver/composite/compinit.c
View file @
5413c5ec
...
...
@@ -226,13 +226,8 @@ compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals)
{
VisualID
*
p
;
#ifndef NXAGENT_SERVER
p
=
reallocarray
(
cs
->
alternateVisuals
,
cs
->
numAlternateVisuals
+
nVisuals
,
sizeof
(
VisualID
));
#else
p
=
realloc
(
cs
->
alternateVisuals
,
sizeof
(
VisualID
)
*
(
cs
->
numAlternateVisuals
+
nVisuals
));
#endif
if
(
p
==
NULL
)
return
FALSE
;
...
...
@@ -261,13 +256,8 @@ CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen,
CompScreenPtr
cs
=
GetCompScreen
(
pScreen
);
CompImplicitRedirectException
*
p
;
#ifndef NXAGENT_SERVER
p
=
reallocarray
(
cs
->
implicitRedirectExceptions
,
cs
->
numImplicitRedirectExceptions
+
1
,
sizeof
(
p
[
0
]));
#else
p
=
realloc
(
cs
->
implicitRedirectExceptions
,
sizeof
(
p
[
0
])
*
(
cs
->
numImplicitRedirectExceptions
+
1
));
#endif
if
(
p
==
NULL
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/dix/colormap.c
View file @
5413c5ec
...
...
@@ -2721,13 +2721,8 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
first_new_vid
=
depth
->
numVids
;
first_new_visual
=
pScreen
->
numVisuals
;
#if 0 /* !defined(NXAGENT_SERVER) */
vids
=
reallocarray
(
depth
->
vids
,
depth
->
numVids
+
new_visual_count
,
sizeof
(
XID
));
#else
vids
=
realloc
(
depth
->
vids
,
sizeof
(
XID
)
*
(
depth
->
numVids
+
new_visual_count
));
#endif
if
(
!
vids
)
return
FALSE
;
...
...
@@ -2735,11 +2730,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
depth
->
vids
=
vids
;
numVisuals
=
pScreen
->
numVisuals
+
new_visual_count
;
#if 0 /* !defined(NXAGENT_SERVER) */
visuals
=
reallocarray
(
pScreen
->
visuals
,
numVisuals
,
sizeof
(
VisualRec
));
#else
visuals
=
realloc
(
pScreen
->
visuals
,
sizeof
(
VisualRec
)
*
numVisuals
);
#endif
if
(
!
visuals
)
{
return
FALSE
;
}
...
...
nx-X11/programs/Xserver/randr/rrcrtc.c
View file @
5413c5ec
...
...
@@ -90,13 +90,8 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
/* make space for the crtc pointer */
if
(
pScrPriv
->
numCrtcs
)
#ifndef NXAGENT_SERVER
crtcs
=
reallocarray
(
pScrPriv
->
crtcs
,
pScrPriv
->
numCrtcs
+
1
,
sizeof
(
RRCrtcPtr
));
#else
/* !defined(NXAGENT_SERVER) */
crtcs
=
realloc
(
pScrPriv
->
crtcs
,
(
pScrPriv
->
numCrtcs
+
1
)
*
sizeof
(
RRCrtcPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
crtcs
=
malloc
(
sizeof
(
RRCrtcPtr
));
if
(
!
crtcs
)
...
...
@@ -206,13 +201,8 @@ RRCrtcNotify(RRCrtcPtr crtc,
if
(
numOutputs
)
{
if
(
crtc
->
numOutputs
)
#ifndef NXAGENT_SERVER
newoutputs
=
reallocarray
(
crtc
->
outputs
,
numOutputs
,
sizeof
(
RROutputPtr
));
#else
/* !defined(NXAGENT_SERVER) */
newoutputs
=
realloc
(
crtc
->
outputs
,
numOutputs
*
sizeof
(
RROutputPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
#ifndef NXAGENT_SERVER
newoutputs
=
xallocarray
(
numOutputs
,
sizeof
(
RROutputPtr
));
...
...
nx-X11/programs/Xserver/randr/rrinfo.c
View file @
5413c5ec
...
...
@@ -55,13 +55,8 @@ RROldModeAdd(RROutputPtr output, RRScreenSizePtr size, int refresh)
}
if
(
output
->
numModes
)
#ifndef NXAGENT_SERVER
modes
=
reallocarray
(
output
->
modes
,
output
->
numModes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
modes
=
realloc
(
output
->
modes
,
(
output
->
numModes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
modes
=
malloc
(
sizeof
(
RRModePtr
));
if
(
!
modes
)
{
...
...
@@ -271,13 +266,8 @@ RRRegisterSize(ScreenPtr pScreen,
for
(
i
=
0
;
i
<
pScrPriv
->
nSizes
;
i
++
)
if
(
RRScreenSizeMatches
(
&
tmp
,
&
pScrPriv
->
pSizes
[
i
]))
return
&
pScrPriv
->
pSizes
[
i
];
#ifndef NXAGENT_SERVER
pNew
=
reallocarray
(
pScrPriv
->
pSizes
,
pScrPriv
->
nSizes
+
1
,
sizeof
(
RRScreenSize
));
#else
/* !defined(NXAGENT_SERVER) */
pNew
=
realloc
(
pScrPriv
->
pSizes
,
(
pScrPriv
->
nSizes
+
1
)
*
sizeof
(
RRScreenSize
));
#endif
/* !defined(NXAGENT_SERVER) */
if
(
!
pNew
)
return
0
;
pNew
[
pScrPriv
->
nSizes
++
]
=
tmp
;
...
...
@@ -299,11 +289,7 @@ RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate)
if
(
pSize
->
pRates
[
i
].
rate
==
rate
)
return
TRUE
;
#ifndef NXAGENT_SERVER
pNew
=
reallocarray
(
pSize
->
pRates
,
pSize
->
nRates
+
1
,
sizeof
(
RRScreenRate
));
#else
/* !defined(NXAGENT_SERVER) */
pNew
=
realloc
(
pSize
->
pRates
,
(
pSize
->
nRates
+
1
)
*
sizeof
(
RRScreenRate
));
#endif
/* !defined(NXAGENT_SERVER) */
if
(
!
pNew
)
return
FALSE
;
pRate
=
&
pNew
[
pSize
->
nRates
++
];
...
...
nx-X11/programs/Xserver/randr/rrmode.c
View file @
5413c5ec
...
...
@@ -104,11 +104,7 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
mode
->
userScreen
=
userScreen
;
if
(
num_modes
)
#ifndef NXAGENT_SERVER
newModes
=
reallocarray
(
modes
,
num_modes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
newModes
=
realloc
(
modes
,
(
num_modes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
newModes
=
malloc
(
sizeof
(
RRModePtr
));
...
...
nx-X11/programs/Xserver/randr/rrmonitor.c
View file @
5413c5ec
...
...
@@ -507,14 +507,9 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
* needs to not have any side-effects on failure
*/
if
(
pScrPriv
->
numMonitors
)
#ifndef NXAGENT_SERVER
monitors
=
reallocarray
(
pScrPriv
->
monitors
,
pScrPriv
->
numMonitors
+
1
,
sizeof
(
RRMonitorPtr
));
#else
/* !defined(NXAGENT_SERVER) */
monitors
=
realloc
(
pScrPriv
->
monitors
,
(
pScrPriv
->
numMonitors
+
1
)
*
sizeof
(
RRMonitorPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
monitors
=
malloc
(
sizeof
(
RRMonitorPtr
));
...
...
nx-X11/programs/Xserver/randr/rroutput.c
View file @
5413c5ec
...
...
@@ -75,13 +75,8 @@ RROutputCreate(ScreenPtr pScreen,
pScrPriv
=
rrGetScrPriv
(
pScreen
);
if
(
pScrPriv
->
numOutputs
)
#ifndef NXAGENT_SERVER
outputs
=
reallocarray
(
pScrPriv
->
outputs
,
pScrPriv
->
numOutputs
+
1
,
sizeof
(
RROutputPtr
));
#else
/* !defined(NXAGENT_SERVER) */
outputs
=
realloc
(
pScrPriv
->
outputs
,
(
pScrPriv
->
numOutputs
+
1
)
*
sizeof
(
RROutputPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
outputs
=
malloc
(
sizeof
(
RROutputPtr
));
if
(
!
outputs
)
...
...
@@ -228,13 +223,8 @@ RROutputAddUserMode(RROutputPtr output, RRModePtr mode)
return
BadMatch
;
if
(
output
->
userModes
)
#ifndef NXAGENT_SERVER
newModes
=
reallocarray
(
output
->
userModes
,
output
->
numUserModes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
newModes
=
realloc
(
output
->
userModes
,
(
output
->
numUserModes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
newModes
=
malloc
(
sizeof
(
RRModePtr
));
if
(
!
newModes
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment