stpcpy.c (dc36d6f9bb1753f3808552f3afd30eda9a7b206a) stpcpy.c (e55512504d0178983978d64d67eed1cc85826523)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1999
5 * David E. O'Brien
6 * Copyright (c) 1988, 1993
7 * The Regents of the University of California. All rights reserved.
8 *

--- 19 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <string.h>
35
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1999
5 * David E. O'Brien
6 * Copyright (c) 1988, 1993
7 * The Regents of the University of California. All rights reserved.
8 *

--- 19 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <string.h>
35
36#undef stpcpy /* _FORTIFY_SOURCE */
37
36char *
37stpcpy(char * __restrict to, const char * __restrict from)
38{
39
40 for (; (*to = *from); ++from, ++to);
41 return(to);
42}
38char *
39stpcpy(char * __restrict to, const char * __restrict from)
40{
41
42 for (; (*to = *from); ++from, ++to);
43 return(to);
44}