Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
lvzhengyang
git2
Commits
b22593fb
Commit
b22593fb
authored
Nov 01, 2013
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_file: Style fixes
parent
653ec420
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
src/config_file.c
+6
-9
No files found.
src/config_file.c
View file @
b22593fb
...
...
@@ -125,7 +125,7 @@ static int cvar_length(cvar_t *var)
int
length
=
0
;
while
(
var
)
{
length
+=
1
;
length
++
;
var
=
var
->
next
;
}
...
...
@@ -579,16 +579,16 @@ static int config_delete_multivar(git_config_backend *cfg, const char *name, con
GITERR_CHECK_ALLOC
(
to_delete
);
to_delete_idx
=
0
;
for
(;;
)
{
cvar_t
*
var_
next
=
var
->
next
;
while
(
var
!=
NULL
)
{
cvar_t
*
next
=
var
->
next
;
if
(
regexec
(
&
preg
,
var
->
entry
->
value
,
0
,
NULL
,
0
)
==
0
)
{
// If we are past the head, reattach previous node to next one,
// otherwise set the new head for the strmap.
if
(
prev
!=
NULL
)
{
prev
->
next
=
var_
next
;
prev
->
next
=
next
;
}
else
{
new_head
=
var_
next
;
new_head
=
next
;
}
to_delete
[
to_delete_idx
++
]
=
var
;
...
...
@@ -596,10 +596,7 @@ static int config_delete_multivar(git_config_backend *cfg, const char *name, con
prev
=
var
;
}
if
(
var_next
==
NULL
)
break
;
var
=
var_next
;
var
=
next
;
}
if
(
new_head
!=
NULL
)
{
...
...
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