Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin
bionic
Commits
dd8f3c80
Commit
dd8f3c80
authored
15 years ago
by
David Turner
Committed by
Android Code Review
15 years ago
Browse files
Options
Download
Plain Diff
Merge "improve readability of string: fix indentation and remove trailing spaces"
parents
5586838b
30a419af
master
froyo
froyo-release
gingerbread
gingerbread-mr4-release
gingerbread-release
ics-factoryrom-2-release
ics-mr0
ics-mr0-release
ics-mr1
ics-mr1-release
ics-plus-aosp
idea133
idea133-weekly-release
jb-dev
jb-mr0-release
jb-mr1-dev
jb-mr1-dev-plus-aosp
jb-mr1-release
jb-mr1.1-cts-dev
jb-mr1.1-dev
jb-mr1.1-dev-plus-aosp
jb-mr1.1-release
jb-mr2-cts-dev
jb-mr2-dev
jb-mr2-release
jb-mr2.0-release
jb-mr2.0.0-release
jb-release
kitkat-cts-dev
kitkat-dev
kitkat-mr1-release
kitkat-mr1.1-release
kitkat-mr2-release
kitkat-mr2.1-release
kitkat-mr2.2-release
kitkat-release
kitkat-wear
l-preview
lollipop-cts-dev
lollipop-dev
lollipop-mr1-cts-dev
lollipop-mr1-dev
lollipop-mr1-fi-release
lollipop-mr1-release
lollipop-mr1-wfc-release
lollipop-release
lollipop-wear-release
marshmallow-cts-dev
marshmallow-dev
marshmallow-release
master-soong
studio-1.1-release
tools_r20
tools_r21
tools_r22
tools_r22.2
android-wear-5.1.1_r1
android-wear-5.1.0_r1
android-wear-5.0.0_r1
android-sdk-support_r11
android-sdk-adt_r20
android-sdk-adt_r16.0.1
android-sdk-4.4.2_r1.0.1
android-sdk-4.4.2_r1
android-sdk-4.0.3_r1
android-sdk-4.0.3-tools_r1
android-m-preview
android-m-preview-2
android-m-preview-1
android-l-preview_r2
android-cts-verifier-4.0.3_r1
android-cts-verifier-4.0_r1
android-cts-6.0_r1
android-cts-5.1_r3
android-cts-5.1_r2
android-cts-5.1_r1
android-cts-5.0_r3
android-cts-4.4_r4
android-cts-4.4_r1
android-cts-4.2_r2
android-cts-4.2_r1
android-cts-4.1_r4
android-cts-4.1_r2
android-cts-4.1_r1
android-cts-4.0.3_r2
android-cts-4.0.3_r1
android-cts-4.0_r1
android-cts-2.3_r12
android-cts-2.3_r11
android-cts-2.3_r10
android-cts-2.2_r8
android-6.0.0_r1
android-5.1.1_r24
android-5.1.1_r23
android-5.1.1_r22
android-5.1.1_r20
android-5.1.1_r19
android-5.1.1_r18
android-5.1.1_r17
android-5.1.1_r16
android-5.1.1_r15
android-5.1.1_r14
android-5.1.1_r13
android-5.1.1_r12
android-5.1.1_r10
android-5.1.1_r9
android-5.1.1_r8
android-5.1.1_r7
android-5.1.1_r6
android-5.1.1_r5
android-5.1.1_r4
android-5.1.1_r3
android-5.1.1_r2
android-5.1.1_r1
android-5.1.0_r5
android-5.1.0_r4
android-5.1.0_r3
android-5.1.0_r1
android-5.0.2_r3
android-5.0.2_r1
android-5.0.1_r1
android-5.0.0_r7
android-5.0.0_r6
android-5.0.0_r5.1
android-5.0.0_r5
android-5.0.0_r4
android-5.0.0_r3
android-5.0.0_r2
android-5.0.0_r1
android-4.4.4_r2.0.1
android-4.4.4_r2
android-4.4.4_r1.0.1
android-4.4.4_r1
android-4.4.3_r1.1.0.1
android-4.4.3_r1.1
android-4.4.3_r1.0.1
android-4.4.3_r1
android-4.4.2_r2.0.1
android-4.4.2_r2
android-4.4.2_r1.0.1
android-4.4.2_r1
android-4.4.1_r1.0.1
android-4.4.1_r1
android-4.4w_r1
android-4.4_r1.2.0.1
android-4.4_r1.2
android-4.4_r1.1.0.1
android-4.4_r1.1
android-4.4_r1.0.1
android-4.4_r1
android-4.4_r0.9
android-4.4_r0.8
android-4.4_r0.7
android-4.3.1_r1
android-4.3_r3.1
android-4.3_r3
android-4.3_r2.3
android-4.3_r2.2
android-4.3_r2.1
android-4.3_r2
android-4.3_r1.1
android-4.3_r1
android-4.3_r0.9.1
android-4.3_r0.9
android-4.2.2_r1.2
android-4.2.2_r1.1
android-4.2.2_r1
android-4.2.1_r1.2
android-4.2.1_r1.1
android-4.2.1_r1
android-4.2_r1
android-4.1.2_r2.1
android-4.1.2_r2
android-4.1.2_r1
android-4.1.1_r6.1
android-4.1.1_r6
android-4.1.1_r5
android-4.1.1_r4
android-4.1.1_r3
android-4.1.1_r2
android-4.1.1_r1.1
android-4.1.1_r1
android-4.0.4_r2.1
android-4.0.4_r2
android-4.0.4_r1.2
android-4.0.4_r1.1
android-4.0.4_r1
android-4.0.3_r1.1
android-4.0.3_r1
android-4.0.2_r1
android-4.0.1_r1.2
android-4.0.1_r1.1
android-4.0.1_r1
android-2.3.7_r1
android-2.3.6_r1
android-2.3.6_r0.9
android-2.3.5_r1
android-2.3.4_r1
android-2.3.4_r0.9
android-2.3.3_r1.1
android-2.3.3_r1
android-2.3.2_r1
android-2.3.1_r1
android-2.3_r1
android-2.2.3_r2.1
android-2.2.3_r2
android-2.2.3_r1
android-2.2.2_r1
android-2.2.1_r2
android-2.2.1_r1
android-2.2_r1.3
android-2.2_r1.2
android-2.2_r1.1
android-2.2_r1
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
17 additions
and
18 deletions
+17
-18
libc/string/strcasecmp.c
libc/string/strcasecmp.c
+2
-2
libc/string/strchr.c
libc/string/strchr.c
+1
-1
libc/string/strcoll.c
libc/string/strcoll.c
+1
-1
libc/string/strlcat.c
libc/string/strlcat.c
+2
-2
libc/string/strlcpy.c
libc/string/strlcpy.c
+1
-1
libc/string/strncat.c
libc/string/strncat.c
+1
-1
libc/string/strncmp.c
libc/string/strncmp.c
+1
-2
libc/string/strncpy.c
libc/string/strncpy.c
+2
-2
libc/string/strpbrk.c
libc/string/strpbrk.c
+1
-1
libc/string/strrchr.c
libc/string/strrchr.c
+2
-2
libc/string/strsep.c
libc/string/strsep.c
+1
-1
libc/string/strstr.c
libc/string/strstr.c
+1
-1
libc/string/strxfrm.c
libc/string/strxfrm.c
+1
-1
No files found.
libc/string/strcasecmp.c
View file @
dd8f3c80
...
...
@@ -98,8 +98,8 @@ strncasecmp(const char *s1, const char *s2, size_t n)
if
(
cm
[
*
us1
]
!=
cm
[
*
us2
++
])
return
(
cm
[
*
us1
]
-
cm
[
*--
us2
]);
if
(
*
us1
++
==
'\0'
)
break
;
break
;
}
while
(
--
n
!=
0
);
}
}
return
(
0
);
}
This diff is collapsed.
Click to expand it.
libc/string/strchr.c
View file @
dd8f3c80
...
...
@@ -38,6 +38,6 @@ strchr(const char *p, int ch)
return
((
char
*
)
p
);
if
(
!*
p
)
return
((
char
*
)
NULL
);
}
}
/* NOTREACHED */
}
This diff is collapsed.
Click to expand it.
libc/string/strcoll.c
View file @
dd8f3c80
...
...
@@ -36,5 +36,5 @@
int
strcoll
(
const
char
*
s1
,
const
char
*
s2
)
{
return
strcmp
(
s1
,
s2
);
return
strcmp
(
s1
,
s2
);
}
This diff is collapsed.
Click to expand it.
libc/string/strlcat.c
View file @
dd8f3c80
...
...
@@ -46,9 +46,9 @@ strlcat(char *dst, const char *src, size_t siz)
if
(
n
!=
1
)
{
*
d
++
=
*
s
;
n
--
;
}
}
s
++
;
}
}
*
d
=
'\0'
;
return
(
dlen
+
(
s
-
src
));
/* count does not include NUL */
...
...
This diff is collapsed.
Click to expand it.
libc/string/strlcpy.c
View file @
dd8f3c80
...
...
@@ -37,7 +37,7 @@ strlcpy(char *dst, const char *src, size_t siz)
if
((
*
d
++
=
*
s
++
)
==
'\0'
)
break
;
}
}
}
/* Not enough room in dst, add NUL and traverse rest of src */
if
(
n
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
libc/string/strncat.c
View file @
dd8f3c80
...
...
@@ -52,6 +52,6 @@ strncat(char *dst, const char *src, size_t n)
d
++
;
}
while
(
--
n
!=
0
);
*
d
=
0
;
}
}
return
(
dst
);
}
This diff is collapsed.
Click to expand it.
libc/string/strncmp.c
View file @
dd8f3c80
...
...
@@ -38,14 +38,13 @@
int
strncmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
n
)
{
if
(
n
==
0
)
return
(
0
);
do
{
if
(
*
s1
!=
*
s2
++
)
return
(
*
(
unsigned
char
*
)
s1
-
*
(
unsigned
char
*
)
--
s2
);
if
(
*
s1
++
==
0
)
break
;
break
;
}
while
(
--
n
!=
0
);
return
(
0
);
}
This diff is collapsed.
Click to expand it.
libc/string/strncpy.c
View file @
dd8f3c80
...
...
@@ -54,8 +54,8 @@ strncpy(char *dst, const char *src, size_t n)
/* NUL pad the remaining n-1 bytes */
while
(
--
n
!=
0
)
*
d
++
=
0
;
break
;
}
break
;
}
}
while
(
--
n
!=
0
);
}
return
(
dst
);
...
...
This diff is collapsed.
Click to expand it.
libc/string/strpbrk.c
View file @
dd8f3c80
...
...
@@ -38,7 +38,7 @@ strpbrk(const char *s1, const char *s2)
{
const
char
*
scanp
;
int
c
,
sc
;
while
((
c
=
*
s1
++
)
!=
0
)
{
for
(
scanp
=
s2
;
(
sc
=
*
scanp
++
)
!=
0
;)
if
(
sc
==
c
)
...
...
This diff is collapsed.
Click to expand it.
libc/string/strrchr.c
View file @
dd8f3c80
...
...
@@ -34,12 +34,12 @@ char *
strrchr
(
const
char
*
p
,
int
ch
)
{
char
*
save
;
for
(
save
=
NULL
;;
++
p
)
{
if
(
*
p
==
ch
)
save
=
(
char
*
)
p
;
if
(
!*
p
)
return
(
save
);
}
}
/* NOTREACHED */
}
This diff is collapsed.
Click to expand it.
libc/string/strsep.c
View file @
dd8f3c80
...
...
@@ -34,7 +34,7 @@
/*
* Get next token from string *stringp, where tokens are possibly-empty
* strings separated by characters from delim.
* strings separated by characters from delim.
*
* Writes NULs into the string at *stringp to end tokens.
* delim need not remain constant from call to call.
...
...
This diff is collapsed.
Click to expand it.
libc/string/strstr.c
View file @
dd8f3c80
...
...
@@ -51,6 +51,6 @@ strstr(const char *s, const char *find)
}
while
(
sc
!=
c
);
}
while
(
strncmp
(
s
,
find
,
len
)
!=
0
);
s
--
;
}
}
return
((
char
*
)
s
);
}
This diff is collapsed.
Click to expand it.
libc/string/strxfrm.c
View file @
dd8f3c80
...
...
@@ -29,7 +29,7 @@
/*
* Transform string s2 to string s1 using the current locale so that
* strcmp of transformed strings yields the same result as strcoll.
* strcmp of transformed strings yields the same result as strcoll.
* Since Bionic really does not support locales, we assume we always use
* the C locale.
*
...
...
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