Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libloc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
libloc
Commits
92202e5a
Commit
92202e5a
authored
Nov 27, 2020
by
Michael Tremer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network-list: Exit find operation early when the list is empty
Signed-off-by:
Michael Tremer
<
michael.tremer@ipfire.org
>
parent
7c78416c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/network-list.c
src/network-list.c
+4
-0
No files found.
src/network-list.c
View file @
92202e5a
...
...
@@ -134,6 +134,10 @@ LOC_EXPORT struct loc_network* loc_network_list_get(struct loc_network_list* lis
static
off_t
loc_network_list_find
(
struct
loc_network_list
*
list
,
struct
loc_network
*
network
,
int
*
found
)
{
// Insert at the beginning for an empty list
if
(
loc_network_list_empty
(
list
))
return
0
;
off_t
lo
=
0
;
off_t
hi
=
list
->
size
-
1
;
int
result
;
...
...
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