From 1cd5461a5375207602f2cbdfd9a50a9b751cb7c8 Mon Sep 17 00:00:00 2001 From: Trutz Behn Date: Wed, 3 Jun 2015 19:27:01 +0200 Subject: Use namespace-safe macro, param and variable names --- include/stdlib.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index 5566ab4..2b67235 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -31,20 +31,20 @@ extern "C" { #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #undef realpath -fortify_fn(realpath) char *realpath(const char *path, char *resolved) +_FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) { - size_t bos; + size_t __b; - if (resolved) { + if (__r) { #ifndef PATH_MAX #error PATH_MAX unset. A fortified realpath will not work. #else - bos = __builtin_object_size(resolved, 0); - if (PATH_MAX > bos) + __b = __builtin_object_size(__r, 0); + if (PATH_MAX > __b) __builtin_trap(); #endif } - return __orig_realpath(path, resolved); + return __orig_realpath(__p, __r); } #endif -- cgit v1.3