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
74a5450b
Commit
74a5450b
authored
Jun 26, 2016
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nx-X11/programs/Xserver: Drop {X,x}realloc() macros, use realloc() instead.
parent
2646fc25
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
95 additions
and
96 deletions
+95
-96
transport.c
nx-X11/lib/xtrans/transport.c
+0
-1
glximports.c
nx-X11/programs/Xserver/GL/glx/glximports.c
+1
-1
glxutil.c
nx-X11/programs/Xserver/GL/glx/glxutil.c
+1
-1
unpack.h
nx-X11/programs/Xserver/GL/glx/unpack.h
+1
-1
panoramiX.c
nx-X11/programs/Xserver/Xext/panoramiX.c
+1
-1
security.c
nx-X11/programs/Xserver/Xext/security.c
+1
-1
sync.c
nx-X11/programs/Xserver/Xext/sync.c
+1
-1
chgkbd.c
nx-X11/programs/Xserver/Xi/chgkbd.c
+1
-1
compinit.c
nx-X11/programs/Xserver/composite/compinit.c
+2
-2
dbe.c
nx-X11/programs/Xserver/dbe/dbe.c
+2
-2
atom.c
nx-X11/programs/Xserver/dix/atom.c
+1
-1
colormap.c
nx-X11/programs/Xserver/dix/colormap.c
+12
-12
dispatch.c
nx-X11/programs/Xserver/dix/dispatch.c
+1
-1
dixfonts.c
nx-X11/programs/Xserver/dix/dixfonts.c
+4
-4
dixutils.c
nx-X11/programs/Xserver/dix/dixutils.c
+3
-3
events.c
nx-X11/programs/Xserver/dix/events.c
+4
-4
extension.c
nx-X11/programs/Xserver/dix/extension.c
+3
-3
main.c
nx-X11/programs/Xserver/dix/main.c
+1
-1
privates.c
nx-X11/programs/Xserver/dix/privates.c
+7
-7
property.c
nx-X11/programs/Xserver/dix/property.c
+2
-2
region.c
nx-X11/programs/Xserver/dix/region.c
+3
-3
resource.c
nx-X11/programs/Xserver/dix/resource.c
+2
-2
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+1
-1
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+2
-2
GC.c
nx-X11/programs/Xserver/hw/nxagent/GC.c
+1
-1
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+1
-1
NXdixfonts.c
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+2
-2
NXevents.c
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+1
-1
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+2
-2
miarc.c
nx-X11/programs/Xserver/mi/miarc.c
+3
-3
midash.c
nx-X11/programs/Xserver/mi/midash.c
+1
-1
mispans.c
nx-X11/programs/Xserver/mi/mispans.c
+5
-5
io.c
nx-X11/programs/Xserver/os/io.c
+4
-4
utils.c
nx-X11/programs/Xserver/os/utils.c
+1
-1
rrcrtc.c
nx-X11/programs/Xserver/randr/rrcrtc.c
+2
-2
rrinfo.c
nx-X11/programs/Xserver/randr/rrinfo.c
+3
-3
rrmode.c
nx-X11/programs/Xserver/randr/rrmode.c
+1
-1
rrmonitor.c
nx-X11/programs/Xserver/randr/rrmonitor.c
+1
-1
rroutput.c
nx-X11/programs/Xserver/randr/rroutput.c
+2
-2
record.c
nx-X11/programs/Xserver/record/record.c
+3
-3
filter.c
nx-X11/programs/Xserver/render/filter.c
+3
-3
glyph.c
nx-X11/programs/Xserver/render/glyph.c
+1
-1
picture.c
nx-X11/programs/Xserver/render/picture.c
+1
-1
No files found.
nx-X11/lib/xtrans/transport.c
View file @
74a5450b
...
...
@@ -60,7 +60,6 @@ from The Open Group.
#else
#include <stdlib.h>
#define xcalloc(_num,_size) calloc(_num,_size)
#define xrealloc(_ptr,_size) realloc(_ptr,_size)
#endif
#include "Xtransint.h"
...
...
nx-X11/programs/Xserver/GL/glx/glximports.c
View file @
74a5450b
...
...
@@ -94,7 +94,7 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize)
free
(
addr
);
return
NULL
;
}
newAddr
=
x
realloc
(
addr
,
newSize
);
newAddr
=
realloc
(
addr
,
newSize
);
}
else
{
if
(
newSize
==
0
)
{
return
NULL
;
...
...
nx-X11/programs/Xserver/GL/glx/glxutil.c
View file @
74a5450b
...
...
@@ -105,7 +105,7 @@ __glXRealloc(void *addr, size_t newSize)
free
(
addr
);
return
NULL
;
}
else
{
newAddr
=
x
realloc
(
addr
,
newSize
);
newAddr
=
realloc
(
addr
,
newSize
);
}
}
else
{
if
(
newSize
==
0
)
{
...
...
nx-X11/programs/Xserver/GL/glx/unpack.h
View file @
74a5450b
...
...
@@ -93,7 +93,7 @@ extern xGLXSingleReply __glXReply;
else if ((size) > sizeof(answerBuffer)) { \
int bump; \
if ((cl)->returnBufSize < (size)+(align)) { \
(cl)->returnBuf = (GLbyte*)
X
realloc((cl)->returnBuf, \
(cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
(size)+(align)); \
if (!(cl)->returnBuf) { \
return BadAlloc; \
...
...
nx-X11/programs/Xserver/Xext/panoramiX.c
View file @
74a5450b
...
...
@@ -1217,7 +1217,7 @@ XineramaGetImageData(
if
(
sizeNeeded
>
size
)
{
char
*
tmpdata
=
ScratchMem
;
ScratchMem
=
x
realloc
(
ScratchMem
,
sizeNeeded
);
ScratchMem
=
realloc
(
ScratchMem
,
sizeNeeded
);
if
(
ScratchMem
)
size
=
sizeNeeded
;
else
{
...
...
nx-X11/programs/Xserver/Xext/security.c
View file @
74a5450b
...
...
@@ -1720,7 +1720,7 @@ SecurityParseSitePolicy(
if
(
!
copyPolicyStr
)
return
TRUE
;
strcpy
(
copyPolicyStr
,
policyStr
);
newStrings
=
(
char
**
)
X
realloc
(
SecurityPolicyStrings
,
newStrings
=
(
char
**
)
realloc
(
SecurityPolicyStrings
,
sizeof
(
char
*
)
*
(
nSecurityPolicyStrings
+
1
));
if
(
!
newStrings
)
{
...
...
nx-X11/programs/Xserver/Xext/sync.c
View file @
74a5450b
...
...
@@ -1058,7 +1058,7 @@ SyncCreateSystemCounter(name, initial, resolution, counterType,
{
SyncCounter
*
pCounter
;
SysCounterList
=
(
SyncCounter
**
)
x
realloc
(
SysCounterList
,
SysCounterList
=
(
SyncCounter
**
)
realloc
(
SysCounterList
,
(
SyncNumSystemCounters
+
1
)
*
sizeof
(
SyncCounter
*
));
if
(
!
SysCounterList
)
return
(
void
*
)
NULL
;
...
...
nx-X11/programs/Xserver/Xi/chgkbd.c
View file @
74a5450b
...
...
@@ -168,7 +168,7 @@ ProcXChangeKeyboardDevice (client)
if
(
df
->
traceSize
!=
xf
->
traceSize
)
{
Must_have_memory
=
TRUE
;
/* XXX */
df
->
trace
=
(
WindowPtr
*
)
x
realloc
(
df
->
trace
,
df
->
trace
=
(
WindowPtr
*
)
realloc
(
df
->
trace
,
xf
->
traceSize
*
sizeof
(
WindowPtr
));
Must_have_memory
=
FALSE
;
/* XXX */
}
...
...
nx-X11/programs/Xserver/composite/compinit.c
View file @
74a5450b
...
...
@@ -230,7 +230,7 @@ compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals)
p
=
reallocarray
(
cs
->
alternateVisuals
,
cs
->
numAlternateVisuals
+
nVisuals
,
sizeof
(
VisualID
));
#else
p
=
x
realloc
(
cs
->
alternateVisuals
,
p
=
realloc
(
cs
->
alternateVisuals
,
sizeof
(
VisualID
)
*
(
cs
->
numAlternateVisuals
+
nVisuals
));
#endif
if
(
p
==
NULL
)
...
...
@@ -265,7 +265,7 @@ CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen,
p
=
reallocarray
(
cs
->
implicitRedirectExceptions
,
cs
->
numImplicitRedirectExceptions
+
1
,
sizeof
(
p
[
0
]));
#else
p
=
x
realloc
(
cs
->
implicitRedirectExceptions
,
p
=
realloc
(
cs
->
implicitRedirectExceptions
,
sizeof
(
p
[
0
])
*
(
cs
->
numImplicitRedirectExceptions
+
1
));
#endif
if
(
p
==
NULL
)
...
...
nx-X11/programs/Xserver/dbe/dbe.c
View file @
74a5450b
...
...
@@ -268,7 +268,7 @@ DbeAllocWinPrivPriv(pScreen, index, amount)
if
(
index
>=
pDbeScreenPriv
->
winPrivPrivLen
)
{
unsigned
*
nsizes
;
nsizes
=
(
unsigned
*
)
x
realloc
(
pDbeScreenPriv
->
winPrivPrivSizes
,
nsizes
=
(
unsigned
*
)
realloc
(
pDbeScreenPriv
->
winPrivPrivSizes
,
(
index
+
1
)
*
sizeof
(
unsigned
));
if
(
!
nsizes
)
{
...
...
@@ -564,7 +564,7 @@ ProcDbeAllocateBackBufferName(client)
}
/* malloc/realloc a new array and initialize all elements to 0. */
pDbeWindowPriv
->
IDs
=
(
XID
*
)
x
realloc
(
pIDs
,
pDbeWindowPriv
->
IDs
=
(
XID
*
)
realloc
(
pIDs
,
(
pDbeWindowPriv
->
maxAvailableIDs
+
DBE_INCR_MAX_IDS
)
*
sizeof
(
XID
));
if
(
!
pDbeWindowPriv
->
IDs
)
{
...
...
nx-X11/programs/Xserver/dix/atom.c
View file @
74a5450b
...
...
@@ -129,7 +129,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
if
((
lastAtom
+
1
)
>=
tableLength
)
{
NodePtr
*
table
;
table
=
(
NodePtr
*
)
x
realloc
(
nodeTable
,
table
=
(
NodePtr
*
)
realloc
(
nodeTable
,
tableLength
*
(
2
*
sizeof
(
NodePtr
)));
if
(
!
table
)
{
if
(
nd
->
string
!=
string
)
...
...
nx-X11/programs/Xserver/dix/colormap.c
View file @
74a5450b
...
...
@@ -841,7 +841,7 @@ AllocColor (ColormapPtr pmap,
*
pgreen
=
pmap
->
red
[
pixR
].
co
.
local
.
green
;
*
pblue
=
pmap
->
red
[
pixR
].
co
.
local
.
blue
;
npix
=
pmap
->
numPixelsRed
[
client
];
ppix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsRed
[
client
],
ppix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsRed
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
return
(
BadAlloc
);
...
...
@@ -864,21 +864,21 @@ AllocColor (ColormapPtr pmap,
*
pgreen
=
pmap
->
green
[
pixG
].
co
.
local
.
green
;
*
pblue
=
pmap
->
blue
[
pixB
].
co
.
local
.
blue
;
npix
=
pmap
->
numPixelsRed
[
client
];
ppix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsRed
[
client
],
ppix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsRed
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
return
(
BadAlloc
);
ppix
[
npix
]
=
pixR
;
pmap
->
clientPixelsRed
[
client
]
=
ppix
;
npix
=
pmap
->
numPixelsGreen
[
client
];
ppix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsGreen
[
client
],
ppix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsGreen
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
return
(
BadAlloc
);
ppix
[
npix
]
=
pixG
;
pmap
->
clientPixelsGreen
[
client
]
=
ppix
;
npix
=
pmap
->
numPixelsBlue
[
client
];
ppix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsBlue
[
client
],
ppix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsBlue
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
return
(
BadAlloc
);
...
...
@@ -1348,7 +1348,7 @@ gotit:
break
;
}
npix
=
nump
[
client
];
ppix
=
(
Pixel
*
)
x
realloc
(
pixp
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
ppix
=
(
Pixel
*
)
realloc
(
pixp
[
client
],
(
npix
+
1
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
{
pent
->
refcnt
--
;
...
...
@@ -1762,17 +1762,17 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
if
(
okR
&&
okG
&&
okB
)
{
rpix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsRed
[
client
],
rpix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsRed
[
client
],
(
pmap
->
numPixelsRed
[
client
]
+
(
c
<<
r
))
*
sizeof
(
Pixel
));
if
(
rpix
)
pmap
->
clientPixelsRed
[
client
]
=
rpix
;
gpix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsGreen
[
client
],
gpix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsGreen
[
client
],
(
pmap
->
numPixelsGreen
[
client
]
+
(
c
<<
g
))
*
sizeof
(
Pixel
));
if
(
gpix
)
pmap
->
clientPixelsGreen
[
client
]
=
gpix
;
bpix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsBlue
[
client
],
bpix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsBlue
[
client
],
(
pmap
->
numPixelsBlue
[
client
]
+
(
c
<<
b
))
*
sizeof
(
Pixel
));
if
(
bpix
)
...
...
@@ -1861,7 +1861,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
/* all the allocated pixels are added to the client pixel list,
* but only the unique ones are returned to the client */
ppix
=
(
Pixel
*
)
x
realloc
(
pmap
->
clientPixelsRed
[
client
],
ppix
=
(
Pixel
*
)
realloc
(
pmap
->
clientPixelsRed
[
client
],
(
pmap
->
numPixelsRed
[
client
]
+
npix
)
*
sizeof
(
Pixel
));
if
(
!
ppix
)
{
...
...
@@ -2364,7 +2364,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
npix
++
;
}
}
pptr
=
(
Pixel
*
)
x
realloc
(
ppixClient
,
npixNew
*
sizeof
(
Pixel
));
pptr
=
(
Pixel
*
)
realloc
(
ppixClient
,
npixNew
*
sizeof
(
Pixel
));
if
(
pptr
)
ppixClient
=
pptr
;
npixClient
=
npixNew
;
...
...
@@ -2729,7 +2729,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
vids = reallocarray(depth->vids, depth->numVids + new_visual_count,
sizeof(XID));
#else
vids
=
x
realloc
(
depth
->
vids
,
sizeof
(
XID
)
*
vids
=
realloc
(
depth
->
vids
,
sizeof
(
XID
)
*
(
depth
->
numVids
+
new_visual_count
));
#endif
if
(
!
vids
)
...
...
@@ -2742,7 +2742,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
#if 0 /* !defined(NXAGENT_SERVER) */
visuals = reallocarray(pScreen->visuals, numVisuals, sizeof(VisualRec));
#else
visuals
=
x
realloc
(
pScreen
->
visuals
,
sizeof
(
VisualRec
)
*
numVisuals
);
visuals
=
realloc
(
pScreen
->
visuals
,
sizeof
(
VisualRec
)
*
numVisuals
);
#endif
if
(
!
visuals
)
{
return
FALSE
;
...
...
nx-X11/programs/Xserver/dix/dispatch.c
View file @
74a5450b
...
...
@@ -1023,7 +1023,7 @@ ProcSetSelectionOwner(register ClientPtr client)
if
(
i
==
0
)
newsels
=
(
Selection
*
)
malloc
(
sizeof
(
Selection
));
else
newsels
=
(
Selection
*
)
x
realloc
(
CurrentSelections
,
newsels
=
(
Selection
*
)
realloc
(
CurrentSelections
,
(
NumCurrentSelections
+
1
)
*
sizeof
(
Selection
));
if
(
!
newsels
)
return
BadAlloc
;
...
...
nx-X11/programs/Xserver/dix/dixfonts.c
View file @
74a5450b
...
...
@@ -170,7 +170,7 @@ QueueFontWakeup(FontPathElementPtr fpe)
}
if
(
num_slept_fpes
==
size_slept_fpes
)
{
new
=
(
FontPathElementPtr
*
)
x
realloc
(
slept_fpes
,
realloc
(
slept_fpes
,
sizeof
(
FontPathElementPtr
)
*
(
size_slept_fpes
+
4
));
if
(
!
new
)
return
;
...
...
@@ -302,7 +302,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if
(
err
==
FontNameAlias
&&
alias
)
{
newlen
=
strlen
(
alias
);
newname
=
(
char
*
)
x
realloc
(
c
->
fontname
,
newlen
);
newname
=
(
char
*
)
realloc
(
c
->
fontname
,
newlen
);
if
(
!
newname
)
{
err
=
AllocError
;
break
;
...
...
@@ -1038,7 +1038,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
reply
=
c
->
reply
;
if
(
c
->
length
<
length
)
{
reply
=
(
xListFontsWithInfoReply
*
)
x
realloc
(
c
->
reply
,
length
);
reply
=
(
xListFontsWithInfoReply
*
)
realloc
(
c
->
reply
,
length
);
if
(
!
reply
)
{
err
=
AllocError
;
...
...
@@ -1998,7 +1998,7 @@ RegisterFPEFunctions(NameCheckFunc name_func,
FPEFunctions
*
new
;
/* grow the list */
new
=
(
FPEFunctions
*
)
x
realloc
(
fpe_functions
,
new
=
(
FPEFunctions
*
)
realloc
(
fpe_functions
,
(
num_fpe_types
+
1
)
*
sizeof
(
FPEFunctions
));
if
(
!
new
)
return
-
1
;
...
...
nx-X11/programs/Xserver/dix/dixutils.c
View file @
74a5450b
...
...
@@ -351,7 +351,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
if
(
j
<
numnow
)
/* duplicate */
return
(
Success
);
numnow
++
;
pTmp
=
(
SaveSetElt
*
)
x
realloc
(
client
->
saveSet
,
sizeof
(
*
pTmp
)
*
numnow
);
pTmp
=
(
SaveSetElt
*
)
realloc
(
client
->
saveSet
,
sizeof
(
*
pTmp
)
*
numnow
);
if
(
!
pTmp
)
return
(
BadAlloc
);
client
->
saveSet
=
pTmp
;
...
...
@@ -371,7 +371,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
numnow
--
;
if
(
numnow
)
{
pTmp
=
(
SaveSetElt
*
)
x
realloc
(
client
->
saveSet
,
sizeof
(
*
pTmp
)
*
numnow
);
pTmp
=
(
SaveSetElt
*
)
realloc
(
client
->
saveSet
,
sizeof
(
*
pTmp
)
*
numnow
);
if
(
pTmp
)
client
->
saveSet
=
pTmp
;
}
...
...
@@ -504,7 +504,7 @@ RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
if
(
numHandlers
>=
sizeHandlers
)
{
new
=
(
BlockHandlerPtr
)
x
realloc
(
handlers
,
(
numHandlers
+
1
)
*
new
=
(
BlockHandlerPtr
)
realloc
(
handlers
,
(
numHandlers
+
1
)
*
sizeof
(
BlockHandlerRec
));
if
(
!
new
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/dix/events.c
View file @
74a5450b
...
...
@@ -1952,7 +1952,7 @@ XYToWindow(int x, int y)
{
spriteTraceSize
+=
10
;
Must_have_memory
=
TRUE
;
/* XXX */
spriteTrace
=
(
WindowPtr
*
)
x
realloc
(
spriteTrace
=
(
WindowPtr
*
)
realloc
(
spriteTrace
,
spriteTraceSize
*
sizeof
(
WindowPtr
));
Must_have_memory
=
FALSE
;
/* XXX */
}
...
...
@@ -2467,7 +2467,7 @@ CheckPassiveGrabsOnWindow(
if
(
device
->
sync
.
evcount
<
count
)
{
Must_have_memory
=
TRUE
;
/* XXX */
device
->
sync
.
event
=
(
xEvent
*
)
x
realloc
(
device
->
sync
.
event
,
device
->
sync
.
event
=
(
xEvent
*
)
realloc
(
device
->
sync
.
event
,
count
*
sizeof
(
xEvent
));
Must_have_memory
=
FALSE
;
/* XXX */
...
...
@@ -2639,7 +2639,7 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
if
(
thisDev
->
sync
.
evcount
<
count
)
{
Must_have_memory
=
TRUE
;
/* XXX */
thisDev
->
sync
.
event
=
(
xEvent
*
)
x
realloc
(
thisDev
->
sync
.
event
,
thisDev
->
sync
.
event
=
(
xEvent
*
)
realloc
(
thisDev
->
sync
.
event
,
count
*
sizeof
(
xEvent
));
Must_have_memory
=
FALSE
;
/* XXX */
}
...
...
@@ -3530,7 +3530,7 @@ SetInputFocus(
{
focus
->
traceSize
=
depth
+
1
;
Must_have_memory
=
TRUE
;
/* XXX */
focus
->
trace
=
(
WindowPtr
*
)
x
realloc
(
focus
->
trace
,
focus
->
trace
=
(
WindowPtr
*
)
realloc
(
focus
->
trace
,
focus
->
traceSize
*
sizeof
(
WindowPtr
));
Must_have_memory
=
FALSE
;
/* XXX */
...
...
nx-X11/programs/Xserver/dix/extension.c
View file @
74a5450b
...
...
@@ -108,7 +108,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
}
strcpy
(
ext
->
name
,
name
);
i
=
NumExtensions
;
newexts
=
(
ExtensionEntry
**
)
x
realloc
(
extensions
,
newexts
=
(
ExtensionEntry
**
)
realloc
(
extensions
,
(
i
+
1
)
*
sizeof
(
ExtensionEntry
*
));
if
(
!
newexts
)
{
...
...
@@ -159,7 +159,7 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
char
*
name
;
char
**
aliases
;
aliases
=
(
char
**
)
x
realloc
(
ext
->
aliases
,
aliases
=
(
char
**
)
realloc
(
ext
->
aliases
,
(
ext
->
num_aliases
+
1
)
*
sizeof
(
char
*
));
if
(
!
aliases
)
return
FALSE
;
...
...
@@ -442,7 +442,7 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
if
(
!
newname
)
return
FALSE
;
procEntry
=
(
ProcEntryPtr
)
x
realloc
(
spentry
->
procList
,
realloc
(
spentry
->
procList
,
sizeof
(
ProcEntryRec
)
*
(
spentry
->
num
+
1
));
if
(
!
procEntry
)
{
...
...
nx-X11/programs/Xserver/dix/main.c
View file @
74a5450b
...
...
@@ -618,7 +618,7 @@ CreateConnectionBlock()
{
lenofblock
+=
sizeof
(
xDepth
)
+
(
pDepth
->
numVids
*
sizeof
(
xVisualType
));
pBuf
=
(
char
*
)
x
realloc
(
ConnectionInfo
,
lenofblock
);
pBuf
=
(
char
*
)
realloc
(
ConnectionInfo
,
lenofblock
);
if
(
!
pBuf
)
{
free
(
ConnectionInfo
);
...
...
nx-X11/programs/Xserver/dix/privates.c
View file @
74a5450b
...
...
@@ -89,7 +89,7 @@ AllocateClientPrivate(int index2, unsigned amount)
if
(
index2
>=
clientPrivateLen
)
{
unsigned
*
nsizes
;
nsizes
=
(
unsigned
*
)
x
realloc
(
clientPrivateSizes
,
nsizes
=
(
unsigned
*
)
realloc
(
clientPrivateSizes
,
(
index2
+
1
)
*
sizeof
(
unsigned
));
if
(
!
nsizes
)
return
FALSE
;
...
...
@@ -136,7 +136,7 @@ AllocateScreenPrivateIndex()
for
(
i
=
0
;
i
<
screenInfo
.
numScreens
;
i
++
)
{
pScreen
=
screenInfo
.
screens
[
i
];
nprivs
=
(
DevUnion
*
)
x
realloc
(
pScreen
->
devPrivates
,
nprivs
=
(
DevUnion
*
)
realloc
(
pScreen
->
devPrivates
,
screenPrivateCount
*
sizeof
(
DevUnion
));
if
(
!
nprivs
)
{
...
...
@@ -180,7 +180,7 @@ AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if
(
index2
>=
pScreen
->
WindowPrivateLen
)
{
unsigned
*
nsizes
;
nsizes
=
(
unsigned
*
)
x
realloc
(
pScreen
->
WindowPrivateSizes
,
nsizes
=
(
unsigned
*
)
realloc
(
pScreen
->
WindowPrivateSizes
,
(
index2
+
1
)
*
sizeof
(
unsigned
));
if
(
!
nsizes
)
return
FALSE
;
...
...
@@ -230,7 +230,7 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if
(
index2
>=
pScreen
->
GCPrivateLen
)
{
unsigned
*
nsizes
;
nsizes
=
(
unsigned
*
)
x
realloc
(
pScreen
->
GCPrivateSizes
,
nsizes
=
(
unsigned
*
)
realloc
(
pScreen
->
GCPrivateSizes
,
(
index2
+
1
)
*
sizeof
(
unsigned
));
if
(
!
nsizes
)
return
FALSE
;
...
...
@@ -280,7 +280,7 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if
(
index2
>=
pScreen
->
PixmapPrivateLen
)
{
unsigned
*
nsizes
;
nsizes
=
(
unsigned
*
)
x
realloc
(
pScreen
->
PixmapPrivateSizes
,
nsizes
=
(
unsigned
*
)
realloc
(
pScreen
->
PixmapPrivateSizes
,
(
index2
+
1
)
*
sizeof
(
unsigned
));
if
(
!
nsizes
)
return
FALSE
;
...
...
@@ -345,7 +345,7 @@ AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc)
if
(
pColormap
)
{
privs
=
(
DevUnion
*
)
x
realloc
(
pColormap
->
devPrivates
,
privs
=
(
DevUnion
*
)
realloc
(
pColormap
->
devPrivates
,
colormapPrivateCount
*
sizeof
(
DevUnion
));
if
(
!
privs
)
{
colormapPrivateCount
--
;
...
...
@@ -380,7 +380,7 @@ Bool
AllocateDevicePrivate
(
DeviceIntPtr
device
,
int
index
)
{
if
(
device
->
nPrivates
<
++
index
)
{
DevUnion
*
nprivs
=
(
DevUnion
*
)
x
realloc
(
device
->
devPrivates
,
DevUnion
*
nprivs
=
(
DevUnion
*
)
realloc
(
device
->
devPrivates
,
index
*
sizeof
(
DevUnion
));
if
(
!
nprivs
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/dix/property.c
View file @
74a5450b
...
...
@@ -318,7 +318,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
{
if
(
totalSize
!=
pProp
->
size
*
(
pProp
->
format
>>
3
))
{
data
=
(
void
*
)
x
realloc
(
pProp
->
data
,
totalSize
);
data
=
(
void
*
)
realloc
(
pProp
->
data
,
totalSize
);
if
(
!
data
&&
len
)
return
(
BadAlloc
);
pProp
->
data
=
data
;
...
...
@@ -335,7 +335,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
else
if
(
mode
==
PropModeAppend
)
{
data
=
(
void
*
)
x
realloc
(
pProp
->
data
,
data
=
(
void
*
)
realloc
(
pProp
->
data
,
sizeInBytes
*
(
len
+
pProp
->
size
));
if
(
!
data
)
return
(
BadAlloc
);
...
...
nx-X11/programs/Xserver/dix/region.c
View file @
74a5450b
...
...
@@ -210,7 +210,7 @@ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
{ \
size_t NewSize = RegionSizeof(numRects); \
RegDataPtr NewData = \
(NewSize > 0) ? (RegDataPtr)
x
realloc((reg)->data, NewSize) : NULL; \
(NewSize > 0) ? (RegDataPtr)realloc((reg)->data, NewSize) : NULL; \
if (NewData) \
{ \
NewData->size = (numRects); \
...
...
@@ -391,7 +391,7 @@ RegionRectAlloc(
}
n
+=
pRgn
->
data
->
numRects
;
rgnSize
=
RegionSizeof
(
n
);
data
=
(
rgnSize
>
0
)
?
x
realloc
(
pRgn
->
data
,
rgnSize
)
:
NULL
;
data
=
(
rgnSize
>
0
)
?
realloc
(
pRgn
->
data
,
rgnSize
)
:
NULL
;
if
(
!
data
)
return
RegionBreak
(
pRgn
);
pRgn
->
data
=
data
;
...
...
@@ -1299,7 +1299,7 @@ RegionValidate(badreg, pOverlap)
{
/* Oops, allocate space for new region information */
sizeRI
<<=
1
;
rit
=
(
RegionInfo
*
)
x
realloc
(
ri
,
sizeRI
*
sizeof
(
RegionInfo
));
rit
=
(
RegionInfo
*
)
realloc
(
ri
,
sizeRI
*
sizeof
(
RegionInfo
));
if
(
!
rit
)
goto
bail
;
ri
=
rit
;
...
...
nx-X11/programs/Xserver/dix/resource.c
View file @
74a5450b
...
...
@@ -178,7 +178,7 @@ CreateNewResourceType(DeleteType deleteFunc)
if
(
next
&
lastResourceClass
)
return
0
;
funcs
=
(
DeleteType
*
)
x
realloc
(
DeleteFuncs
,
funcs
=
(
DeleteType
*
)
realloc
(
DeleteFuncs
,
(
next
+
1
)
*
sizeof
(
DeleteType
));
if
(
!
funcs
)
return
0
;
...
...
@@ -186,7 +186,7 @@ CreateNewResourceType(DeleteType deleteFunc)
#ifdef XResExtension
{
Atom
*
newnames
;
newnames
=
x
realloc
(
ResourceNames
,
(
next
+
1
)
*
sizeof
(
Atom
));
newnames
=
realloc
(
ResourceNames
,
(
next
+
1
)
*
sizeof
(
Atom
));
if
(
!
newnames
)
return
0
;
ResourceNames
=
newnames
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
74a5450b
...
...
@@ -2549,7 +2549,7 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentNumDefaultColormaps
=
nxagentNumVisuals
;
nxagentDefaultColormaps
=
(
Colormap
*
)
x
realloc
(
nxagentDefaultColormaps
,
nxagentDefaultColormaps
=
(
Colormap
*
)
realloc
(
nxagentDefaultColormaps
,
nxagentNumDefaultColormaps
*
sizeof
(
Colormap
));
if
(
nxagentDefaultColormaps
==
NULL
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
74a5450b
...
...
@@ -306,7 +306,7 @@ void nxagentListRemoteAddName(const char *name, int status)
if
(
nxagentRemoteFontList
.
length
==
nxagentRemoteFontList
.
listSize
)
{
nxagentRemoteFontList
.
list
=
x
realloc
(
nxagentRemoteFontList
.
list
,
sizeof
(
nxagentFontRecPtr
)
nxagentRemoteFontList
.
list
=
realloc
(
nxagentRemoteFontList
.
list
,
sizeof
(
nxagentFontRecPtr
)
*
(
nxagentRemoteFontList
.
listSize
+
1000
));
if
(
nxagentRemoteFontList
.
list
==
NULL
)
...
...
@@ -569,7 +569,7 @@ Bool nxagentRealizeFont(ScreenPtr pScreen, FontPtr pFont)
if
(
CACHE_INDEX
==
CACHE_SIZE
)
{
CACHE_ENTRY_PTR
=
x
realloc
(
CACHE_ENTRY_PTR
,
sizeof
(
nxCacheFontEntryRecPtr
)
*
(
CACHE_SIZE
+
100
));
CACHE_ENTRY_PTR
=
realloc
(
CACHE_ENTRY_PTR
,
sizeof
(
nxCacheFontEntryRecPtr
)
*
(
CACHE_SIZE
+
100
));
if
(
CACHE_ENTRY_PTR
==
NULL
)
{
...
...
nx-X11/programs/Xserver/hw/nxagent/GC.c
View file @
74a5450b
...
...
@@ -1613,7 +1613,7 @@ GCPtr nxagentCreateGraphicContext(int depth)
* to spread the list and add a new GC.
*/
nxagentGCs
=
x
realloc
(
nxagentGraphicContexts
,
(
nxagentGraphicContextsSize
+
1
)
*
sizeof
(
nxagentGraphicContextsRec
));
nxagentGCs
=
realloc
(
nxagentGraphicContexts
,
(
nxagentGraphicContextsSize
+
1
)
*
sizeof
(
nxagentGraphicContextsRec
));
if
(
nxagentGCs
==
NULL
)
{
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
74a5450b
...
...
@@ -752,7 +752,7 @@ ProcSetSelectionOwner(register ClientPtr client)
if
(
i
==
0
)
newsels
=
(
Selection
*
)
malloc
(
sizeof
(
Selection
));
else
newsels
=
(
Selection
*
)
x
realloc
(
CurrentSelections
,
newsels
=
(
Selection
*
)
realloc
(
CurrentSelections
,
(
NumCurrentSelections
+
1
)
*
sizeof
(
Selection
));
if
(
!
newsels
)
return
BadAlloc
;
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
View file @
74a5450b
...
...
@@ -227,7 +227,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if
(
err
==
FontNameAlias
&&
alias
)
{
newlen
=
strlen
(
alias
);
newname
=
(
char
*
)
x
realloc
(
c
->
fontname
,
newlen
);
newname
=
(
char
*
)
realloc
(
c
->
fontname
,
newlen
);
if
(
!
newname
)
{
err
=
AllocError
;
break
;
...
...
@@ -846,7 +846,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
reply
=
c
->
reply
;
if
(
c
->
length
<
length
)
{
reply
=
(
xListFontsWithInfoReply
*
)
x
realloc
(
c
->
reply
,
length
);
reply
=
(
xListFontsWithInfoReply
*
)
realloc
(
c
->
reply
,
length
);
if
(
!
reply
)
{
err
=
AllocError
;
...
...
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
View file @
74a5450b
...
...
@@ -363,7 +363,7 @@ XYToWindow(int x, int y)
{
spriteTraceSize
+=
10
;
Must_have_memory
=
TRUE
;
/* XXX */
spriteTrace
=
(
WindowPtr
*
)
x
realloc
(
spriteTrace
=
(
WindowPtr
*
)
realloc
(
spriteTrace
,
spriteTraceSize
*
sizeof
(
WindowPtr
));
Must_have_memory
=
FALSE
;
/* XXX */
}
...
...
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
74a5450b
...
...
@@ -261,7 +261,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
{
if
(
totalSize
!=
pProp
->
size
*
(
pProp
->
format
>>
3
))
{
data
=
(
void
*
)
x
realloc
(
pProp
->
data
,
totalSize
);
data
=
(
void
*
)
realloc
(
pProp
->
data
,
totalSize
);
if
(
!
data
&&
len
)
return
(
BadAlloc
);
pProp
->
data
=
data
;
...
...
@@ -278,7 +278,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
else
if
(
mode
==
PropModeAppend
)
{
data
=
(
void
*
)
x
realloc
(
pProp
->
data
,
data
=
(
void
*
)
realloc
(
pProp
->
data
,
sizeInBytes
*
(
len
+
pProp
->
size
));
if
(
!
data
)
return
(
BadAlloc
);
...
...
nx-X11/programs/Xserver/mi/miarc.c
View file @
74a5450b
...
...
@@ -1754,7 +1754,7 @@ addCap (
if
(
*
ncapsp
==
*
sizep
)
{
newsize
=
*
sizep
+
ADD_REALLOC_STEP
;
cap
=
(
miArcCapPtr
)
x
realloc
(
*
capsp
,
cap
=
(
miArcCapPtr
)
realloc
(
*
capsp
,
newsize
*
sizeof
(
**
capsp
));
if
(
!
cap
)
return
;
...
...
@@ -1785,7 +1785,7 @@ addJoin (
if
(
*
njoinsp
==
*
sizep
)
{
newsize
=
*
sizep
+
ADD_REALLOC_STEP
;
join
=
(
miArcJoinPtr
)
x
realloc
(
*
joinsp
,
join
=
(
miArcJoinPtr
)
realloc
(
*
joinsp
,
newsize
*
sizeof
(
**
joinsp
));
if
(
!
join
)
return
;
...
...
@@ -1815,7 +1815,7 @@ addArc (
if
(
*
narcsp
==
*
sizep
)
{
newsize
=
*
sizep
+
ADD_REALLOC_STEP
;
arc
=
(
miArcDataPtr
)
x
realloc
(
*
arcsp
,
arc
=
(
miArcDataPtr
)
realloc
(
*
arcsp
,
newsize
*
sizeof
(
**
arcsp
));
if
(
!
arc
)
return
(
miArcDataPtr
)
NULL
;
...
...
nx-X11/programs/Xserver/mi/midash.c
View file @
74a5450b
...
...
@@ -265,7 +265,7 @@ CheckDashStorage(
miDashPtr
newppseg
;
*
pnsegMax
+=
NSEGDELTA
;
newppseg
=
(
miDashPtr
)
x
realloc
(
*
ppseg
,
newppseg
=
(
miDashPtr
)
realloc
(
*
ppseg
,
(
*
pnsegMax
)
*
sizeof
(
miDashRec
));
if
(
!
newppseg
)
{
...
...
nx-X11/programs/Xserver/mi/mispans.c
View file @
74a5450b
...
...
@@ -155,12 +155,12 @@ void miSubtractSpans (spanGroup, sub)
int
*
newwid
;
#define EXTRA 8
newPt
=
(
DDXPointPtr
)
x
realloc
(
spans
->
points
,
(
spans
->
count
+
EXTRA
)
*
sizeof
(
DDXPointRec
));
newPt
=
(
DDXPointPtr
)
realloc
(
spans
->
points
,
(
spans
->
count
+
EXTRA
)
*
sizeof
(
DDXPointRec
));
if
(
!
newPt
)
break
;
spansPt
=
newPt
+
(
spansPt
-
spans
->
points
);
spans
->
points
=
newPt
;
newwid
=
(
int
*
)
x
realloc
(
spans
->
widths
,
(
spans
->
count
+
EXTRA
)
*
sizeof
(
int
));
newwid
=
(
int
*
)
realloc
(
spans
->
widths
,
(
spans
->
count
+
EXTRA
)
*
sizeof
(
int
));
if
(
!
newwid
)
break
;
spansWid
=
newwid
+
(
spansWid
-
spans
->
widths
);
...
...
@@ -198,7 +198,7 @@ void miAppendSpans(spanGroup, otherGroup, spans)
if
(
spanGroup
->
size
==
spanGroup
->
count
)
{
spanGroup
->
size
=
(
spanGroup
->
size
+
8
)
*
2
;
spanGroup
->
group
=
(
Spans
*
)
x
realloc
(
spanGroup
->
group
,
sizeof
(
Spans
)
*
spanGroup
->
size
);
realloc
(
spanGroup
->
group
,
sizeof
(
Spans
)
*
spanGroup
->
size
);
}
spanGroup
->
group
[
spanGroup
->
count
]
=
*
spans
;
...
...
@@ -456,10 +456,10 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
DDXPointPtr
newpoints
;
int
*
newwidths
;
ysizes
[
index
]
=
(
ysizes
[
index
]
+
8
)
*
2
;
newpoints
=
(
DDXPointPtr
)
x
realloc
(
newpoints
=
(
DDXPointPtr
)
realloc
(
newspans
->
points
,
ysizes
[
index
]
*
sizeof
(
DDXPointRec
));
newwidths
=
(
int
*
)
x
realloc
(
newwidths
=
(
int
*
)
realloc
(
newspans
->
widths
,
ysizes
[
index
]
*
sizeof
(
int
));
if
(
!
newpoints
||
!
newwidths
)
...
...
nx-X11/programs/Xserver/os/io.c
View file @
74a5450b
...
...
@@ -321,7 +321,7 @@ ReadRequestFromClient(ClientPtr client)
/* make buffer bigger to accomodate request */
char
*
ibuf
;
ibuf
=
(
char
*
)
x
realloc
(
oci
->
buffer
,
needed
);
ibuf
=
(
char
*
)
realloc
(
oci
->
buffer
,
needed
);
if
(
!
ibuf
)
{
YieldControlDeath
();
...
...
@@ -371,7 +371,7 @@ ReadRequestFromClient(ClientPtr client)
{
char
*
ibuf
;
ibuf
=
(
char
*
)
x
realloc
(
oci
->
buffer
,
BUFSIZE
);
ibuf
=
(
char
*
)
realloc
(
oci
->
buffer
,
BUFSIZE
);
if
(
ibuf
)
{
oci
->
size
=
BUFSIZE
;
...
...
@@ -531,7 +531,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
{
char
*
ibuf
;
ibuf
=
(
char
*
)
x
realloc
(
oci
->
buffer
,
gotnow
+
count
);
ibuf
=
(
char
*
)
realloc
(
oci
->
buffer
,
gotnow
+
count
);
if
(
!
ibuf
)
return
(
FALSE
);
oci
->
size
=
gotnow
+
count
;
...
...
@@ -1097,7 +1097,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
{
unsigned
char
*
obuf
;
obuf
=
(
unsigned
char
*
)
x
realloc
(
oco
->
buf
,
obuf
=
(
unsigned
char
*
)
realloc
(
oco
->
buf
,
notWritten
+
BUFSIZE
);
if
(
!
obuf
)
{
...
...
nx-X11/programs/Xserver/os/utils.c
View file @
74a5450b
...
...
@@ -1220,7 +1220,7 @@ InsertFileIntoCommandLine(
}
}
buf
=
(
char
*
)
x
realloc
(
buf
,
q
-
buf
);
buf
=
(
char
*
)
realloc
(
buf
,
q
-
buf
);
if
(
!
buf
)
FatalError
(
"Out of memory reallocing option buf
\n
"
);
...
...
nx-X11/programs/Xserver/randr/rrcrtc.c
View file @
74a5450b
...
...
@@ -86,7 +86,7 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
crtcs
=
reallocarray
(
pScrPriv
->
crtcs
,
pScrPriv
->
numCrtcs
+
1
,
sizeof
(
RRCrtcPtr
));
#else
/* !defined(NXAGENT_SERVER) */
crtcs
=
x
realloc
(
pScrPriv
->
crtcs
,
crtcs
=
realloc
(
pScrPriv
->
crtcs
,
(
pScrPriv
->
numCrtcs
+
1
)
*
sizeof
(
RRCrtcPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
@@ -202,7 +202,7 @@ RRCrtcNotify(RRCrtcPtr crtc,
newoutputs
=
reallocarray
(
crtc
->
outputs
,
numOutputs
,
sizeof
(
RROutputPtr
));
#else
/* !defined(NXAGENT_SERVER) */
newoutputs
=
x
realloc
(
crtc
->
outputs
,
newoutputs
=
realloc
(
crtc
->
outputs
,
numOutputs
*
sizeof
(
RROutputPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
nx-X11/programs/Xserver/randr/rrinfo.c
View file @
74a5450b
...
...
@@ -59,7 +59,7 @@ RROldModeAdd(RROutputPtr output, RRScreenSizePtr size, int refresh)
modes
=
reallocarray
(
output
->
modes
,
output
->
numModes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
modes
=
x
realloc
(
output
->
modes
,
modes
=
realloc
(
output
->
modes
,
(
output
->
numModes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
@@ -275,7 +275,7 @@ RRRegisterSize(ScreenPtr pScreen,
pNew
=
reallocarray
(
pScrPriv
->
pSizes
,
pScrPriv
->
nSizes
+
1
,
sizeof
(
RRScreenSize
));
#else
/* !defined(NXAGENT_SERVER) */
pNew
=
x
realloc
(
pScrPriv
->
pSizes
,
pNew
=
realloc
(
pScrPriv
->
pSizes
,
(
pScrPriv
->
nSizes
+
1
)
*
sizeof
(
RRScreenSize
));
#endif
/* !defined(NXAGENT_SERVER) */
if
(
!
pNew
)
...
...
@@ -302,7 +302,7 @@ RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate)
#ifndef NXAGENT_SERVER
pNew
=
reallocarray
(
pSize
->
pRates
,
pSize
->
nRates
+
1
,
sizeof
(
RRScreenRate
));
#else
/* !defined(NXAGENT_SERVER) */
pNew
=
x
realloc
(
pSize
->
pRates
,
(
pSize
->
nRates
+
1
)
*
sizeof
(
RRScreenRate
));
pNew
=
realloc
(
pSize
->
pRates
,
(
pSize
->
nRates
+
1
)
*
sizeof
(
RRScreenRate
));
#endif
/* !defined(NXAGENT_SERVER) */
if
(
!
pNew
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/randr/rrmode.c
View file @
74a5450b
...
...
@@ -99,7 +99,7 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
#ifndef NXAGENT_SERVER
newModes
=
reallocarray
(
modes
,
num_modes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
newModes
=
x
realloc
(
modes
,
(
num_modes
+
1
)
*
sizeof
(
RRModePtr
));
newModes
=
realloc
(
modes
,
(
num_modes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
nx-X11/programs/Xserver/randr/rrmonitor.c
View file @
74a5450b
...
...
@@ -512,7 +512,7 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
pScrPriv
->
numMonitors
+
1
,
sizeof
(
RRMonitorPtr
));
#else
/* !defined(NXAGENT_SERVER) */
monitors
=
x
realloc
(
pScrPriv
->
monitors
,
monitors
=
realloc
(
pScrPriv
->
monitors
,
(
pScrPriv
->
numMonitors
+
1
)
*
sizeof
(
RRMonitorPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
nx-X11/programs/Xserver/randr/rroutput.c
View file @
74a5450b
...
...
@@ -79,7 +79,7 @@ RROutputCreate(ScreenPtr pScreen,
outputs
=
reallocarray
(
pScrPriv
->
outputs
,
pScrPriv
->
numOutputs
+
1
,
sizeof
(
RROutputPtr
));
#else
/* !defined(NXAGENT_SERVER) */
outputs
=
x
realloc
(
pScrPriv
->
outputs
,
outputs
=
realloc
(
pScrPriv
->
outputs
,
(
pScrPriv
->
numOutputs
+
1
)
*
sizeof
(
RROutputPtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
@@ -232,7 +232,7 @@ RROutputAddUserMode(RROutputPtr output, RRModePtr mode)
newModes
=
reallocarray
(
output
->
userModes
,
output
->
numUserModes
+
1
,
sizeof
(
RRModePtr
));
#else
/* !defined(NXAGENT_SERVER) */
newModes
=
x
realloc
(
output
->
userModes
,
newModes
=
realloc
(
output
->
userModes
,
(
output
->
numUserModes
+
1
)
*
sizeof
(
RRModePtr
));
#endif
/* !defined(NXAGENT_SERVER) */
else
...
...
nx-X11/programs/Xserver/record/record.c
View file @
74a5450b
...
...
@@ -1228,7 +1228,7 @@ RecordAddClientToRCAP(pRCAP, clientspec)
{
if
(
pRCAP
->
clientIDsSeparatelyAllocated
)
{
XID
*
pNewIDs
=
(
XID
*
)
x
realloc
(
pRCAP
->
pClientIDs
,
XID
*
pNewIDs
=
(
XID
*
)
realloc
(
pRCAP
->
pClientIDs
,
(
pRCAP
->
sizeClients
+
CLIENT_ARRAY_GROWTH_INCREMENT
)
*
sizeof
(
XID
));
if
(
!
pNewIDs
)
...
...
@@ -2037,7 +2037,7 @@ ProcRecordCreateContext(client)
/* make sure there is room in ppAllContexts to store the new context */
ppNewAllContexts
=
(
RecordContextPtr
*
)
x
realloc
(
ppAllContexts
,
sizeof
(
RecordContextPtr
)
*
(
numContexts
+
1
));
realloc
(
ppAllContexts
,
sizeof
(
RecordContextPtr
)
*
(
numContexts
+
1
));
if
(
!
ppNewAllContexts
)
goto
bailout
;
ppAllContexts
=
ppNewAllContexts
;
...
...
@@ -2162,7 +2162,7 @@ RecordAllocRanges(pri, nRanges)
#define SZINCR 8
newsize
=
max
(
pri
->
size
+
SZINCR
,
nRanges
);
pNewRange
=
(
xRecordRange
*
)
x
realloc
(
pri
->
pRanges
,
pNewRange
=
(
xRecordRange
*
)
realloc
(
pri
->
pRanges
,
newsize
*
sizeof
(
xRecordRange
));
if
(
!
pNewRange
)
return
BadAlloc
;
...
...
nx-X11/programs/Xserver/render/filter.c
View file @
74a5450b
...
...
@@ -68,7 +68,7 @@ PictureGetFilterId (char *filter, int len, Bool makeit)
memcpy
(
name
,
filter
,
len
);
name
[
len
]
=
'\0'
;
if
(
filterNames
)
names
=
x
realloc
(
filterNames
,
(
nfilterNames
+
1
)
*
sizeof
(
char
*
));
names
=
realloc
(
filterNames
,
(
nfilterNames
+
1
)
*
sizeof
(
char
*
));
else
names
=
malloc
(
sizeof
(
char
*
));
if
(
!
names
)
...
...
@@ -144,7 +144,7 @@ PictureAddFilter (ScreenPtr pScreen,
if
(
ps
->
filters
[
i
].
id
==
id
)
return
-
1
;
if
(
ps
->
filters
)
filters
=
x
realloc
(
ps
->
filters
,
(
ps
->
nfilters
+
1
)
*
sizeof
(
PictFilterRec
));
filters
=
realloc
(
ps
->
filters
,
(
ps
->
nfilters
+
1
)
*
sizeof
(
PictFilterRec
));
else
filters
=
malloc
(
sizeof
(
PictFilterRec
));
if
(
!
filters
)
...
...
@@ -175,7 +175,7 @@ PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias)
PictFilterAliasPtr
aliases
;
if
(
ps
->
filterAliases
)
aliases
=
x
realloc
(
ps
->
filterAliases
,
aliases
=
realloc
(
ps
->
filterAliases
,
(
ps
->
nfilterAliases
+
1
)
*
sizeof
(
PictFilterAliasRec
));
else
...
...
nx-X11/programs/Xserver/render/glyph.c
View file @
74a5450b
...
...
@@ -117,7 +117,7 @@ _GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr)
if
(
n
>
glyphSet
->
maxPrivate
)
{
if
(
glyphSet
->
devPrivates
&&
glyphSet
->
devPrivates
!=
(
void
*
)(
&
glyphSet
[
1
]))
{
new
=
(
void
**
)
x
realloc
(
glyphSet
->
devPrivates
,
new
=
(
void
**
)
realloc
(
glyphSet
->
devPrivates
,
(
n
+
1
)
*
sizeof
(
void
*
));
if
(
!
new
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/render/picture.c
View file @
74a5450b
...
...
@@ -82,7 +82,7 @@ AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount)
{
unsigned
int
*
nsizes
;
nsizes
=
(
unsigned
int
*
)
x
realloc
(
ps
->
PicturePrivateSizes
,
nsizes
=
(
unsigned
int
*
)
realloc
(
ps
->
PicturePrivateSizes
,
(
index2
+
1
)
*
sizeof
(
unsigned
int
));
if
(
!
nsizes
)
return
FALSE
;
...
...
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