diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-06 13:04:15 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-06 13:04:50 +0100 |
commit | cd103a888b8149aca66c7a93b91f8f7c2f1dbe31 (patch) | |
tree | 1b86d2a49b5cb9b934ebe27cf2a4dfbe2e88a412 /include | |
parent | 0bc3b393c681403e1e53ef3e5b46d169d509bd8b (diff) |
sal: don't use reserved identifiers, much less in public API
rename to SAL_DETAIL_BOOLEAN_EXPR
Change-Id: Ifb2b2d09a421313e021062cb37ade8777c30f25a
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/types.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index 3dc5f71718cd..f70422af2ee1 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -616,15 +616,15 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { #if defined(__GNUC__) // Macro to try to catch and warn on assignments inside expr. -# define _SAL_BOOLEAN_EXPR(expr) \ - __extension__ ({ \ - int _sal_boolean_var_; \ - if (expr) \ - _sal_boolean_var_ = 1; \ - else \ - _sal_boolean_var_ = 0; \ - _sal_boolean_var_; \ - }) +# define SAL_DETAIL_BOOLEAN_EXPR(expr) \ + __extension__ ({ \ + int sal_boolean_var_; \ + if (expr) \ + sal_boolean_var_ = 1; \ + else \ + sal_boolean_var_ = 0; \ + sal_boolean_var_; \ + }) /** An optimization annotation: denotes that expression is likely to be true. @@ -636,7 +636,7 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { Returns: the boolean value of expr (expressed as either int 1 or 0) */ -# define SAL_LIKELY(expr) (__builtin_expect (_SAL_BOOLEAN_EXPR(expr), 1)) +# define SAL_LIKELY(expr) (__builtin_expect(SAL_DETAIL_BOOLEAN_EXPR(expr), 1)) /** An optimization annotation: denotes that expression is unlikely to be true. @@ -648,7 +648,7 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { Returns: the boolean value of expr (expressed as either int 1 or 0) */ -# define SAL_UNLIKELY(expr) (__builtin_expect (_SAL_BOOLEAN_EXPR(expr), 0)) +# define SAL_UNLIKELY(expr) (__builtin_expect(SAL_DETAIL_BOOLEAN_EXPR(expr), 0)) /** An optimization annotation: tells the compiler to work harder at this code |