Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swen90006-a2-2019
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tian Jinxin
swen90006-a2-2019
Commits
4bdb1e52
Commit
4bdb1e52
authored
Sep 6, 2019
by
Toby Murray
Browse files
Options
Downloads
Patches
Plain Diff
remove some unneeded code to get the coverage stats up higher
parent
e7f804a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/passbook.c
+28
-43
28 additions, 43 deletions
src/passbook.c
with
28 additions
and
43 deletions
src/passbook.c
+
28
−
43
View file @
4bdb1e52
...
...
@@ -246,10 +246,10 @@ nodeptr_list_t list_push(nodeptr_list_t lst, const node_t *p){
return
lst
;
}
/* when out is non-NULL we place a pointer to the first node into it */
/* when out is non-NULL we place a pointer to the first node into it.
assumption: lst.head and lst.last are non-NULL */
nodeptr_list_t
list_pop
(
nodeptr_list_t
lst
,
const
node_t
**
out
){
if
(
lst
.
head
!=
NULL
){
assert
(
lst
.
last
!=
NULL
);
assert
(
lst
.
head
!=
NULL
&&
lst
.
last
!=
NULL
);
if
(
out
!=
NULL
){
*
out
=
lst
.
head
->
p
;
}
...
...
@@ -263,18 +263,12 @@ nodeptr_list_t list_pop(nodeptr_list_t lst, const node_t **out){
lst
.
head
=
ret
;
}
return
lst
;
}
else
{
assert
(
lst
.
last
==
NULL
);
if
(
out
!=
NULL
){
*
out
=
(
const
node_t
*
)
NULL
;
}
return
lst
;
}
}
/* when out is non-NULL we place a pointer to the last node into it.
assumption: lst.head and lst.last are non-NULL */
nodeptr_list_t
list_dequeue
(
nodeptr_list_t
lst
,
const
node_t
**
out
){
if
(
lst
.
last
!=
NULL
){
assert
(
lst
.
head
!=
NULL
);
assert
(
lst
.
head
!=
NULL
&&
lst
.
last
!=
NULL
);
if
(
out
!=
NULL
){
*
out
=
lst
.
last
->
p
;
}
...
...
@@ -289,13 +283,6 @@ nodeptr_list_t list_dequeue(nodeptr_list_t lst, const node_t **out){
lst
.
last
=
ret
;
}
return
lst
;
}
else
{
assert
(
lst
.
head
==
NULL
);
if
(
out
!=
NULL
){
*
out
=
(
const
node_t
*
)
NULL
;
}
return
lst
;
}
}
#ifdef UNUSED_FUNCTIONS
...
...
@@ -534,8 +521,6 @@ static int run(FILE *f){
}
}
}
assert
(
0
&&
"Should never reach here"
);
return
0
;
}
#ifdef PASSBOOK_LIBFUZZER
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment