Skip to content

Commit

Permalink
Add __nonnull attribute to wcscpy and wcsncpy [BZ#18265]
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Marjamäki authored and Florian Weimer committed May 5, 2015
1 parent d0ccd0d commit a6ab6cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2015-04-30 Daniel Marjamäki <daniel.marjamaki@evidente.se>

[BZ #18265]
* wcsmbs/wchar.h (wcscpy): Add __nonnull attribute.
(wcsncpy): Likewise.

2015-05-05 Florian Weimer <fweimer@redhat.com>

* sysdeps/unix/sysv/linux/posix_fallocate.c (posix_fallocate):
Expand Down
6 changes: 4 additions & 2 deletions wcsmbs/wchar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a6ab6cc

Please sign in to comment.