-/* Copyright (C) 1995-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <wchar.h>
wchar_t *
__wcscat_chk (wchar_t *dest, const wchar_t *src, size_t destlen)
{
- register wchar_t *s1 = dest;
- register const wchar_t *s2 = src;
+ wchar_t *s1 = dest;
+ const wchar_t *s2 = src;
wchar_t c;
/* Find the end of the string. */
do
{
- if (__builtin_expect (destlen-- == 0, 0))
+ if (__glibc_unlikely (destlen-- == 0))
__chk_fail ();
c = *s1++;
}
do
{
- if (__builtin_expect (destlen-- == 0, 0))
+ if (__glibc_unlikely (destlen-- == 0))
__chk_fail ();
c = *s2++;
*++s1 = c;