From 2793a70e0fb344aa6b1f3bf7d4923f501c9dccc7 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Wed, 28 Feb 2007 09:18:42 +0000 Subject: [PATCH] remove C99-ism (mixed declaration and code), 10l to Uoti Urpala for breaking GCC-2.95 support yet again even though any post-2.95 GCC version print a clear warning about it Patch by Carl Eugen Hoyos % cehoyos A ag P or P at % git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22374 b3059339-0415-0410-9bf9-f77b7e298cf2 --- m_option.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m_option.c b/m_option.c index 996806fe39..2814e5dcdf 100644 --- a/m_option.c +++ b/m_option.c @@ -1204,10 +1204,12 @@ static double parse_timestring(char *str) static int parse_time(m_option_t* opt,char *name, char *param, void* dst, int src) { + double time; + if (param == NULL || strlen(param) == 0) return M_OPT_MISSING_PARAM; - double time = parse_timestring(param); + time = parse_timestring(param); if (time == -1e100) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: invalid time: '%s'\n", name,param);