summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_timer.c
diff options
context:
space:
mode:
authorPatryk Kaczmarek <patryk.k@samsung.com>2012-09-18 11:38:08 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-18 11:38:08 +0000
commitcc72c09b84b6e99bfcaf41255eec1987b0dc836f (patch)
tree4d3bc4705e0da5f9ef1a0ed8929cdf794ca86c88 /legacy/ecore/src/lib/ecore/ecore_timer.c
parent042ecacd0f6cdbb5a7ed848d4fdf11df6672e70c (diff)
From: Patryk Kaczmarek <patryk.k@samsung.com>
Subject: [E-devel] [Patch] [Ecore] Protection for giving below zero values for ecore_poll and ecore_timer Please also check attached patch for ecore_timer_interval_set and ecore_poller_poll_interval_set. It checks if given time is not zero or below zero. SVN revision: 76805
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_timer.c b/legacy/ecore/src/lib/ecore/ecore_timer.c
index b5b6e6dd05..e462b37b34 100644
--- a/legacy/ecore/src/lib/ecore/ecore_timer.c
+++ b/legacy/ecore/src/lib/ecore/ecore_timer.c
@@ -233,6 +233,12 @@ ecore_timer_interval_set(Ecore_Timer *timer,
233 EINA_MAIN_LOOP_CHECK_RETURN; 233 EINA_MAIN_LOOP_CHECK_RETURN;
234 _ecore_lock(); 234 _ecore_lock();
235 235
236 if (in < 0.0)
237 {
238 ERR("Interval %f less than zero, ignored", in);
239 goto unlock;
240 }
241
236 if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER)) 242 if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
237 { 243 {
238 ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER, 244 ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,