X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fbitfield.h;h=ef5453c29be2397b225126daa8b2515abdb33c61;hb=332335cd19267c1d0238a736aa447dba4f3347c3;hp=c3f2d1ace18b97537212f55d8a3f898022da6139;hpb=6423c3134bf07d4a7db56f69f2c79b540a79c4f1;p=lttng-ust.git diff --git a/include/lttng/bitfield.h b/include/lttng/bitfield.h index c3f2d1ac..ef5453c2 100644 --- a/include/lttng/bitfield.h +++ b/include/lttng/bitfield.h @@ -17,12 +17,19 @@ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ #include /* C99 5.2.4.2 Numerical limits */ #include /* C99 5.2.4.2 Numerical limits */ #include /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */ -#include /* We can't shift a int from 32 bit, >> 32 and << 32 on int is undefined */ #define _bt_piecewise_rshift(_v, _shift) \ @@ -49,7 +56,7 @@ ___v <<= final; \ }) -#define _bt_is_signed_type(type) (((type)(-1)) < 0) +#define _bt_is_signed_type(type) ((type) -1 < (type) 0) #define _bt_unsigned_cast(type, v) \ ({ \