Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
uplex-varnish
trackrdrd
Commits
785cf499
Commit
785cf499
authored
Mar 07, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: use unsigned indexes in data init (large tables were overflowing)
parent
99de8f95
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
child.c
src/child.c
+1
-1
data.c
src/data.c
+3
-3
No files found.
src/child.c
View file @
785cf499
...
...
@@ -609,7 +609,7 @@ static inline dataentry
de
->
tid
=
fd
;
de
->
hasdata
=
false
;
sprintf
(
de
->
data
,
"XID=%
d
"
,
xid
);
sprintf
(
de
->
data
,
"XID=%
u
"
,
xid
);
de
->
end
=
strlen
(
de
->
data
);
if
(
de
->
end
>
dtbl
.
w_stats
.
data_hi
)
dtbl
.
w_stats
.
data_hi
=
de
->
end
;
...
...
src/data.c
View file @
785cf499
...
...
@@ -53,13 +53,13 @@ DATA_Init(void)
dataentry
*
entryptr
;
char
*
bufptr
;
int
bufsize
=
config
.
maxdata
;
unsigned
bufsize
=
config
.
maxdata
;
/*
* we want enough space to accomodate all open and done records
*
*/
int
entries
=
(
1
<<
config
.
maxopen_scale
)
+
config
.
maxdone
;
unsigned
entries
=
(
1
<<
config
.
maxopen_scale
)
+
config
.
maxdone
;
entryptr
=
(
dataentry
*
)
calloc
(
entries
,
sizeof
(
dataentry
));
if
(
entryptr
==
NULL
)
...
...
@@ -82,7 +82,7 @@ DATA_Init(void)
dtbl
.
buf
=
bufptr
;
dtbl
.
nfree
=
0
;
for
(
int
i
=
0
;
i
<
entries
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
entries
;
i
++
)
{
dtbl
.
entry
[
i
].
magic
=
DATA_MAGIC
;
dtbl
.
entry
[
i
].
state
=
DATA_EMPTY
;
dtbl
.
entry
[
i
].
hasdata
=
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