Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
b9ea755c
Commit
b9ea755c
authored
Feb 16, 2018
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reference to exit() function #342
parent
ace52138
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Tree.c
src/Tree.c
+8
-6
No files found.
src/Tree.c
View file @
b9ea755c
/*******************************************************************************
* Copyright (c) 2009, 201
3
IBM Corp.
* Copyright (c) 2009, 201
8
IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
...
...
@@ -34,8 +34,8 @@
int
isRed
(
Node
*
aNode
);
int
isBlack
(
Node
*
aNode
);
int
TreeWalk
(
Node
*
curnode
,
int
depth
);
int
TreeMaxDepth
(
Tree
*
aTree
);
/*int TreeWalk(Node* curnode, int depth);*/
/*int TreeMaxDepth(Tree *aTree);*/
void
TreeRotate
(
Tree
*
aTree
,
Node
*
curnode
,
int
direction
,
int
index
);
Node
*
TreeBAASub
(
Tree
*
aTree
,
Node
*
curnode
,
int
which
,
int
index
);
void
TreeBalanceAfterAdd
(
Tree
*
aTree
,
Node
*
curnode
,
int
index
);
...
...
@@ -110,7 +110,7 @@ int isBlack(Node* aNode)
return
(
aNode
==
NULL
)
||
(
aNode
->
red
==
0
);
}
#if 0
int TreeWalk(Node* curnode, int depth)
{
if (curnode)
...
...
@@ -141,7 +141,7 @@ int TreeMaxDepth(Tree *aTree)
}*/
return rc;
}
#endif
void
TreeRotate
(
Tree
*
aTree
,
Node
*
curnode
,
int
direction
,
int
index
)
{
...
...
@@ -231,7 +231,8 @@ void* TreeAddByIndex(Tree* aTree, void* content, size_t size, int index)
if
(
result
==
0
)
{
if
(
aTree
->
allow_duplicates
)
exit
(
-
99
);
goto
exit
;
/* exit(-99); */
else
{
newel
=
curnode
;
rc
=
newel
->
content
;
...
...
@@ -262,6 +263,7 @@ void* TreeAddByIndex(Tree* aTree, void* content, size_t size, int index)
newel
->
content
=
content
;
newel
->
size
=
size
;
TreeBalanceAfterAdd
(
aTree
,
newel
,
index
);
exit:
return
rc
;
}
...
...
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