fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers.git
Log | Files | Refs | README | LICENSE

commit 316c87a6a606adeb4415ea91c82c5638ab42c0b4
parent 95f63b308458f6459bf9b04142a68a8b01cdd902
Author: sin <sin@2f30.org>
Date:   Tue Mar  3 20:38:52 +0000

Style fix

Diffstat:
include/wchar.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/wchar.h b/include/wchar.h @@ -42,13 +42,13 @@ __fortify_mbsrtowcs(wchar_t *d, const char **s, static inline __attribute__ ((always_inline)) size_t -__fortify_mbstowcs(wchar_t *d, const char *s, size_t wn) +__fortify_mbstowcs(wchar_t *d, const char *s, size_t n) { size_t bos = __builtin_object_size(d, 0); - if (wn > bos / sizeof(wchar_t)) + if (n > bos / sizeof(wchar_t)) __builtin_trap(); - return mbstowcs(d, s, wn); + return mbstowcs(d, s, n); } static inline __attribute__ ((always_inline)) @@ -91,7 +91,7 @@ __fortify_wmemset(wchar_t *s, wchar_t c, size_t n) #undef mbsrtowcs #define mbsrtowcs(d, s, wn, st) __fortify_mbsrtowcs(d, s, wn, st) #undef mbstowcs -#define mbstowcs(d, s, wn) __fortify_mbstowcs(d, s, wn) +#define mbstowcs(d, s, n) __fortify_mbstowcs(d, s, n) #undef wmemcpy #define wmemcpy(d, s, n) __fortify_wmemcpy(d, s, n) #undef wmemmove