Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
370406bb
Commit
370406bb
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: don't optimize for a special case -- it is far too seldom
parent
85844ee6
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/chars.c
+4
-8
src/chars.c
with
4 additions
and
8 deletions
+4
-8
src/chars.c
View file @
370406bb
...
...
@@ -514,7 +514,6 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n)
while
(
*
s1
!=
'\0'
&&
*
s2
!=
'\0'
&&
n
>
0
)
{
bool
bad1
=
FALSE
,
bad2
=
FALSE
;
int
difference
;
if
(
mbtowc
(
&
wc1
,
s1
,
MB_CUR_MAX
)
<
0
)
{
mbtowc_reset
();
...
...
@@ -532,16 +531,13 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n)
if
(
bad1
!=
bad2
)
return
(
bad1
?
1
:
-
1
);
}
else
{
int
difference
=
towlower
(
wc1
)
-
towlower
(
wc2
);
s1
++
;
s2
++
;
n
--
;
continu
e
;
if
(
difference
!=
0
)
return
differenc
e
;
}
difference
=
towlower
(
wc1
)
-
towlower
(
wc2
);
if
(
difference
!=
0
)
return
difference
;
s1
+=
move_mbright
(
s1
,
0
);
s2
+=
move_mbright
(
s2
,
0
);
n
--
;
...
...
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
Menu
Projects
Groups
Snippets
Help