This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Implement strlcpy [BZ #178]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 29 Oct 2015 19:01:04 +0000
- Subject: Re: [PATCH v3] Implement strlcpy [BZ #178]
- Authentication-results: sourceware.org; auth=none
- References: <56326B79 dot 8070804 at redhat dot com>
I support the addition of this API as sufficiently widely used in
practice, but have not reviewed the substance of the patch.
> diff --git a/debug/strlcpy_chk.c b/debug/strlcpy_chk.c
> new file mode 100644
> index 0000000..038d8f9
> --- /dev/null
> +++ b/debug/strlcpy_chk.c
> @@ -0,0 +1,29 @@
> +/* Copyright (C) 2015 Free Software Foundation, Inc.
The first line of any new file should be a descriptive comment, before the
copyright notice.
> diff --git a/string/strlcpy.c b/string/strlcpy.c
> new file mode 100644
> index 0000000..9b39d86
> --- /dev/null
> +++ b/string/strlcpy.c
> @@ -0,0 +1,46 @@
> +/* Copyright (C) 2015 Free Software Foundation, Inc.
Likewise.
> +size_t
> +strlcpy(char *__restrict dest, const char *__restrict src, size_t size)
Missing space before '('.
> diff --git a/string/tst-strlcpy.c b/string/tst-strlcpy.c
> new file mode 100644
> index 0000000..016411b
> --- /dev/null
> +++ b/string/tst-strlcpy.c
Missing descriptive comment.
--
Joseph S. Myers
joseph@codesourcery.com