Security: always use parenthesis around arguments to #defines.

This commit is contained in:
Moritz Bunkus 2004-08-01 12:00:05 +00:00
parent c85af1f8e2
commit 8d5fbe3e63

View File

@ -104,14 +104,14 @@ using namespace std;
(int32_t)(((t) / 60 / 1000) % 60), \
(int32_t)(((t) / 1000) % 60), \
(int32_t)((t) % 1000)
#define ARG_TIMECODE(t) ARG_TIMECODEINT((int64_t)t)
#define ARG_TIMECODE_NS(t) ARG_TIMECODE(t / 1000000)
#define ARG_TIMECODE(t) ARG_TIMECODEINT((int64_t)(t))
#define ARG_TIMECODE_NS(t) ARG_TIMECODE((t) / 1000000)
#define FMT_TIMECODEN "%02d:%02d:%02d.%09d"
#define ARG_TIMECODENINT(t) (int32_t)((t) / 60 / 60 / 1000000000), \
(int32_t)(((t) / 60 / 1000000000) % 60), \
(int32_t)(((t) / 1000000000) % 60), \
(int32_t)((t) % 1000000000)
#define ARG_TIMECODEN(t) ARG_TIMECODENINT((int64_t)t)
#define ARG_TIMECODEN(t) ARG_TIMECODENINT((int64_t)(t))
extern const char * MTX_DLL_API timecode_parser_error;
extern bool MTX_DLL_API parse_timecode(const char *src, int64_t *timecode);