[MPlayer-cvslog] r28793 - trunk/m_option.c
reimar
subversion at mplayerhq.hu
Mon Mar 2 12:10:12 CET 2009
Author: reimar
Date: Mon Mar 2 12:10:11 2009
New Revision: 28793
Log:
Use strtoll in parse_int to avoid discrepancies between 32 and 64 bit systems.
Modified:
trunk/m_option.c
Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c Mon Mar 2 12:06:05 2009 (r28792)
+++ trunk/m_option.c Mon Mar 2 12:10:11 2009 (r28793)
@@ -137,16 +137,16 @@ const m_option_type_t m_option_type_flag
// Integer
static int parse_int(const m_option_t* opt,const char *name, char *param, void* dst, int src) {
- long tmp_int;
+ long long tmp_int;
char *endptr;
src = 0;
if (param == NULL)
return M_OPT_MISSING_PARAM;
- tmp_int = strtol(param, &endptr, 10);
+ tmp_int = strtoll(param, &endptr, 10);
if (*endptr)
- tmp_int = strtol(param, &endptr, 0);
+ tmp_int = strtoll(param, &endptr, 0);
if (*endptr) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param);
return M_OPT_INVALID;
More information about the MPlayer-cvslog
mailing list