[BZ,#18265] Updated annotations for wcscpy and wcsncpy
Commit Message
Hello!
My previous patch (https://sourceware.org/ml/libc-alpha/2015-04/msg00366.html) has not been reviewed.
I think that maybe my patch was too big.
Therefore I try to break out a few changes. This patch is much shorter, I only update the annotations for wcscpy and wcsncpy.
After this patch the annotations for wcscpy and wcsncpy will match the annoations for strcpy and strncpy. This is copy/pasted from string/string.h:
/* Copy SRC to DEST. */
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
__THROW __nonnull ((1, 2));
/* Copy no more than N characters of SRC to DEST. */
extern char *strncpy (char *__restrict __dest,
const char *__restrict __src, size_t __n)
__THROW __nonnull ((1, 2));
I hope this is much easier and quicker for you to review and that it therefore feels safer to accept and commit.
Best regards,
Daniel Marjamäki
..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden
Mobile: +46 (0)709 12 42 62
E-mail: Daniel.Marjamaki@evidente.se
www.evidente.se
Comments
On 04/30/2015 02:50 PM, Daniel Marjamäki wrote:
> +
> + [BZ #18265]
> + * wcsmbs/wchar.h: update annotations for wcscpy and wcsncpy
This is okay.
On Thu, 30 Apr 2015, Florian Weimer wrote:
> On 04/30/2015 02:50 PM, Daniel Marjamäki wrote:
> > +
> > + [BZ #18265]
> > + * wcsmbs/wchar.h: update annotations for wcscpy and wcsncpy
>
> This is okay.
If someone doesn't have write access, just saying a patch is OK isn't
sufficient, you either need to commit it (using --author) or (if
applicable) point them to the assignment forms if the totality of their
changes in glibc would add up to something legally significant as
described at
<https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html>.
On 04/30/2015 05:29 PM, Joseph Myers wrote:
> On Thu, 30 Apr 2015, Florian Weimer wrote:
>
>> On 04/30/2015 02:50 PM, Daniel Marjamäki wrote:
>>> +
>>> + [BZ #18265]
>>> + * wcsmbs/wchar.h: update annotations for wcscpy and wcsncpy
>>
>> This is okay.
>
> If someone doesn't have write access, just saying a patch is OK isn't
> sufficient, you either need to commit it (using --author) or (if
> applicable) point them to the assignment forms if the totality of their
> changes in glibc would add up to something legally significant as
> described at
> <https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html>.
Thanks for the reminder. I've pushed this change now because it's below
the threshold. (We do not follow the GNU policy in glibc—we do not mark
such changes in the ChangeLog file.)
Daniel, if you plan to contribute in the future, please request a
copyright assignment form for glibc by writing to <assign@gnu.org>.
@@ -1,3 +1,8 @@
+2015-04-30 Daniel Marjamäki <daniel.marjamaki@evidente.se>
+
+ [BZ #18265]
+ * wcsmbs/wchar.h: update annotations for wcscpy and wcsncpy
+
2015-04-29 Roland McGrath <roland@hack.frob.com>
* sysdeps/nacl/bits/typesizes.h (__CLOCK_T_TYPE): Use __SLONGWORD_TYPE.
@@ -145,11 +145,13 @@ __USING_NAMESPACE_STD(tm)
__BEGIN_NAMESPACE_STD
/* Copy SRC to DEST. */
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
- const wchar_t *__restrict __src) __THROW;
+ const wchar_t *__restrict __src)
+ __THROW __nonnull ((1, 2));
+
/* Copy no more than N wide-characters of SRC to DEST. */
extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
- __THROW;
+ __THROW __nonnull ((1, 2));
/* Append SRC onto DEST. */
extern wchar_t *wcscat (wchar_t *__restrict __dest,