summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol@kernel.org>2026-07-23 21:40:32 +0200
committerAndrew Morton <akpm@linux-foundation.org>2026-08-05 11:20:12 -0700
commitdbf0633e42ef30bb6db5ed2f1eccf0411d8a4c57 (patch)
treec940f864c0daf524855950e0de637cf2fadbb09f /lib
parentcec0d03fe785380540dc1b4d07c80f67ae2ffc78 (diff)
downloadlinux-dbf0633e42ef30bb6db5ed2f1eccf0411d8a4c57.tar.gz
linux-dbf0633e42ef30bb6db5ed2f1eccf0411d8a4c57.zip
lib/ucs2_string.c: fix indentation
checkpatch.pl reports a total of 18 incorrect use of spaces instead of tabulations in lib/ucs2_string.c. Apply ./scripts/checkpatch.pl --fix-inplace lib/ucs2_string.c to fix them all. Link: https://lore.kernel.org/20260723-fix-ucs2_strnlen-v2-2-9ea94e32a358@kernel.org Signed-off-by: Vincent Mailhol <mailhol@kernel.org> Cc: Kees Cook <kees@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ucs2_string.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/ucs2_string.c b/lib/ucs2_string.c
index ca5c615d5bef..1f7dd4eb640a 100644
--- a/lib/ucs2_string.c
+++ b/lib/ucs2_string.c
@@ -6,18 +6,18 @@
unsigned long
ucs2_strnlen(const ucs2_char_t *s, size_t maxlength)
{
- unsigned long length = 0;
+ unsigned long length = 0;
while (length < maxlength && *s++ != 0)
- length++;
- return length;
+ length++;
+ return length;
}
EXPORT_SYMBOL(ucs2_strnlen);
unsigned long
ucs2_strlen(const ucs2_char_t *s)
{
- return ucs2_strnlen(s, ~0UL);
+ return ucs2_strnlen(s, ~0UL);
}
EXPORT_SYMBOL(ucs2_strlen);
@@ -28,7 +28,7 @@ EXPORT_SYMBOL(ucs2_strlen);
unsigned long
ucs2_strsize(const ucs2_char_t *data, unsigned long maxlength)
{
- return ucs2_strnlen(data, maxlength/sizeof(ucs2_char_t)) * sizeof(ucs2_char_t);
+ return ucs2_strnlen(data, maxlength/sizeof(ucs2_char_t)) * sizeof(ucs2_char_t);
}
EXPORT_SYMBOL(ucs2_strsize);
@@ -87,19 +87,19 @@ EXPORT_SYMBOL(ucs2_strscpy);
int
ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len)
{
- while (1) {
- if (len == 0)
- return 0;
- if (*a < *b)
- return -1;
- if (*a > *b)
- return 1;
- if (*a == 0) /* implies *b == 0 */
- return 0;
- a++;
- b++;
- len--;
- }
+ while (1) {
+ if (len == 0)
+ return 0;
+ if (*a < *b)
+ return -1;
+ if (*a > *b)
+ return 1;
+ if (*a == 0) /* implies *b == 0 */
+ return 0;
+ a++;
+ b++;
+ len--;
+ }
}
EXPORT_SYMBOL(ucs2_strncmp);