Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
sofia-sip
Commits
2e777594
Commit
2e777594
authored
Dec 22, 2005
by
Pekka Pessi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed su_home_auto() problems.
darcs-hash:20051222130717-65a35-44dcbe5a155590818e5646932bb1c9d5936e8bd8.gz
parent
415a5486
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
libsofia-sip-ua/su/su_alloc.c
libsofia-sip-ua/su/su_alloc.c
+8
-4
No files found.
libsofia-sip-ua/su/su_alloc.c
View file @
2e777594
...
...
@@ -228,7 +228,7 @@ unsigned su_block_find_collision, su_block_find_collision_used,
static
inline
su_alloc_t
*
su_block_find
(
su_block_t
*
b
,
void
*
p
)
{
int
h
,
h0
;
unsigned
h
,
h0
,
probe
;
#if SU_ALLOC_STATS
unsigned
collision
=
0
;
...
...
@@ -246,10 +246,12 @@ static inline su_alloc_t *su_block_find(su_block_t *b, void *p)
h
=
h0
=
((
unsigned
long
)
p
)
%
b
->
sub_n
;
probe
=
(
b
->
sub_n
>
SUB_P
)
?
SUB_P
:
1
;
do
{
if
(
b
->
sub_nodes
[
h
].
sua_data
==
p
)
return
&
b
->
sub_nodes
[
h
];
h
+=
SUB_P
;
h
+=
probe
;
if
(
h
>=
b
->
sub_n
)
h
-=
b
->
sub_n
;
#if SU_ALLOC_STATS
...
...
@@ -266,14 +268,16 @@ static inline su_alloc_t *su_block_find(su_block_t *b, void *p)
static
inline
su_alloc_t
*
su_block_add
(
su_block_t
*
b
,
void
*
p
)
{
unsigned
h
;
unsigned
h
,
probe
;
assert
(
p
!=
NULL
);
h
=
((
unsigned
long
)
p
)
%
b
->
sub_n
;
probe
=
(
b
->
sub_n
>
SUB_P
)
?
SUB_P
:
1
;
while
(
b
->
sub_nodes
[
h
].
sua_data
)
{
h
+=
SUB_P
;
h
+=
probe
;
if
(
h
>=
b
->
sub_n
)
h
-=
b
->
sub_n
;
}
...
...
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