Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
025d042c
Commit
025d042c
authored
Aug 13, 2019
by
Xiao Deng
Committed by
Nikias Bassen
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plist: Remove unnecessary parameter from plist_copy_node()
parent
e1a5d60e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
plist.c
src/plist.c
+6
-14
No files found.
src/plist.c
View file @
025d042c
...
...
@@ -321,7 +321,7 @@ PLIST_API void plist_free(plist_t plist)
}
}
static
plist_t
plist_copy_node
(
node_t
*
node
,
void
*
parent_node_ptr
)
static
plist_t
plist_copy_node
(
node_t
*
node
)
{
plist_type
node_type
=
PLIST_NONE
;
plist_t
newnode
=
NULL
;
...
...
@@ -362,20 +362,13 @@ static plist_t plist_copy_node(node_t *node, void *parent_node_ptr)
}
newnode
=
plist_new_node
(
newdata
);
if
(
*
(
plist_t
*
)
parent_node_ptr
)
{
node_attach
(
*
(
plist_t
*
)
parent_node_ptr
,
newnode
);
}
else
{
*
(
plist_t
*
)
parent_node_ptr
=
newnode
;
}
node_t
*
ch
;
unsigned
int
node_index
=
0
;
for
(
ch
=
node_first_child
(
node
);
ch
;
ch
=
node_next_sibling
(
ch
))
{
/* copy child node and attach to new parent node */
plist_t
newch
=
plist_copy_node
(
ch
,
&
newnode
);
/* copy child node */
plist_t
newch
=
plist_copy_node
(
ch
);
/* attach to new parent node */
node_attach
(
newnode
,
newch
);
/* if needed, add child node to lookup table of parent node */
switch
(
node_type
)
{
case
PLIST_ARRAY
:
...
...
@@ -398,8 +391,7 @@ static plist_t plist_copy_node(node_t *node, void *parent_node_ptr)
PLIST_API
plist_t
plist_copy
(
plist_t
node
)
{
plist_t
copied
=
NULL
;
return
plist_copy_node
(
node
,
&
copied
);
return
plist_copy_node
(
node
);
}
PLIST_API
uint32_t
plist_array_get_size
(
plist_t
node
)
...
...
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