Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
37e9ada9
Commit
37e9ada9
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: change a 'do' to a 'while', and return early to elide an 'if'
parent
a99158c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rcfile.c
+11
-13
src/rcfile.c
with
11 additions
and
13 deletions
+11
-13
src/rcfile.c
View file @
37e9ada9
...
...
@@ -188,27 +188,25 @@ char *parse_argument(char *ptr)
const
char
*
ptr_save
=
ptr
;
char
*
last_quote
=
NULL
;
assert
(
ptr
!=
NULL
);
if
(
*
ptr
!=
'"'
)
return
parse_next_word
(
ptr
);
do
{
ptr
++
;
if
(
*
ptr
==
'"'
)
while
(
*
ptr
!=
'\0'
)
{
if
(
*++
ptr
==
'"'
)
last_quote
=
ptr
;
}
while
(
*
ptr
!=
'\0'
);
}
if
(
last_quote
==
NULL
)
{
rcfile_error
(
N_
(
"Argument '%s' has an unterminated
\"
"
),
ptr_save
);
ptr
=
NULL
;
}
else
{
*
last_quote
=
'\0'
;
ptr
=
last_quote
+
1
;
return
NULL
;
}
if
(
ptr
!=
NULL
)
while
(
isblank
((
unsigned
char
)
*
ptr
))
ptr
++
;
*
last_quote
=
'\0'
;
ptr
=
last_quote
+
1
;
while
(
isblank
((
unsigned
char
)
*
ptr
))
ptr
++
;
return
ptr
;
}
...
...
This diff is collapsed.
Click to expand it.
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