diff options
author | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-05-15 14:42:48 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-05-15 15:26:17 -0300 |
commit | 69a1a60a871f8f3c5866b07af2c3a785e129d55d (patch) | |
tree | 513542c5bb0a7145bf8d1ccf574539972030e239 | |
parent | bb8f296d45721629c97f5283e08077829de6c206 (diff) |
[gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros.
Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros.
Fixes #582708.
-rw-r--r-- | gst/gstutils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/gstutils.h b/gst/gstutils.h index 4e40bba3a4..010254aa42 100644 --- a/gst/gstutils.h +++ b/gst/gstutils.h @@ -268,10 +268,10 @@ GST_BOILERPLATE_FULL (type, type_as_function, parent_type, \ /* Define PUT and GET functions for unaligned memory */ #define _GST_GET(__data, __idx, __size, __shift) \ - (((guint##__size) (((guint8 *) (__data))[__idx])) << __shift) + (((guint##__size) (((guint8 *) (__data))[__idx])) << (__shift)) #define _GST_PUT(__data, __idx, __size, __shift, __num) \ - (((guint8 *) (__data))[__idx] = (((guint##__size) __num) >> __shift) & 0xff) + (((guint8 *) (__data))[__idx] = (((guint##__size) (__num)) >> (__shift)) & 0xff) /** * GST_READ_UINT64_BE: |