Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
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
liblongpath
liblongpath-rsync
Commits
3fac8ca8
Commit
3fac8ca8
authored
May 29, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked a variable and a label to make them less confusing.
parent
33766a8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pool_alloc.c
lib/pool_alloc.c
+6
-6
No files found.
lib/pool_alloc.c
View file @
3fac8ca8
...
...
@@ -90,7 +90,7 @@ pool_destroy(alloc_pool_t p)
}
void
*
pool_alloc
(
alloc_pool_t
p
,
size_t
len
,
const
char
*
bomb
)
pool_alloc
(
alloc_pool_t
p
,
size_t
len
,
const
char
*
bomb
_msg
)
{
struct
alloc_pool
*
pool
=
(
struct
alloc_pool
*
)
p
;
if
(
!
pool
)
...
...
@@ -102,7 +102,7 @@ pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
len
+=
pool
->
quantum
-
len
%
pool
->
quantum
;
if
(
len
>
pool
->
size
)
goto
bomb
;
goto
bomb
_out
;
if
(
!
pool
->
live
||
len
>
pool
->
live
->
free
)
{
void
*
start
;
...
...
@@ -125,7 +125,7 @@ pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
asize
+=
sizeof
(
struct
pool_extent
);
if
(
!
(
start
=
new_array
(
char
,
asize
)))
goto
bomb
;
goto
bomb
_out
;
if
(
pool
->
flags
&
POOL_CLEAR
)
memset
(
start
,
0
,
free
);
...
...
@@ -133,7 +133,7 @@ pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
if
(
pool
->
flags
&
POOL_APPEND
)
ext
=
PTR_ADD
(
start
,
free
);
else
if
(
!
(
ext
=
new
(
struct
pool_extent
)))
goto
bomb
;
goto
bomb
_out
;
if
(
pool
->
flags
&
POOL_QALIGN
&&
pool
->
quantum
>
1
&&
(
skew
=
(
size_t
)
PTR_ADD
(
start
,
free
)
%
pool
->
quantum
))
{
bound
+=
skew
;
...
...
@@ -155,9 +155,9 @@ pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
return
PTR_ADD
(
pool
->
live
->
start
,
pool
->
live
->
free
);
bomb
:
bomb_out
:
if
(
pool
->
bomb
)
(
*
pool
->
bomb
)(
bomb
);
(
*
pool
->
bomb
)(
bomb
_msg
);
return
NULL
;
}
...
...
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