[gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros.

Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros.
Fixes #582708.
This commit is contained in:
Thiago Santos 2009-05-15 14:42:48 -03:00
parent bb8f296d45
commit 69a1a60a87

View file

@ -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: