-/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
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/>. */
/* This is almost copied from strncpy.c, written by Torbjorn Granlund. */
char *
__stpncpy_chk (char *dest, const char *src, size_t n, size_t destlen)
{
- char c;
- char *s = dest;
-
if (__builtin_expect (destlen < n, 0))
__chk_fail ();