diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-17 16:42:26 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-17 16:42:26 +0100 |
commit | aec30c85d341e12987db743d880349dbb419eec6 (patch) | |
tree | ce1a75be83c769a320a68a062b0cf0adc20b252d /src | |
parent | 16c7e3285cd16e1f05055a1cc6cc149a66d138de (diff) | |
download | uca-aec30c85d341e12987db743d880349dbb419eec6.tar.gz uca-aec30c85d341e12987db743d880349dbb419eec6.tar.bz2 uca-aec30c85d341e12987db743d880349dbb419eec6.tar.xz uca-aec30c85d341e12987db743d880349dbb419eec6.zip |
Fix potential division by zero bug
Diffstat (limited to 'src')
-rw-r--r-- | src/cameras/dummy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cameras/dummy.c b/src/cameras/dummy.c index 3c1964f..1a7b275 100644 --- a/src/cameras/dummy.c +++ b/src/cameras/dummy.c @@ -3,6 +3,7 @@ #define __USE_BSD #include <unistd.h> #undef __USE_BSD +#include <assert.h> #include "config.h" #include "uca.h" @@ -124,6 +125,7 @@ static void *uca_dummy_grab_thread(void *arg) struct uca_camera *cam = ((struct uca_camera *) arg); struct dummy_cam *dc = GET_DUMMY(cam); + assert(dc->frame_rate > 0); const __useconds_t sleep_time = (unsigned int) 1000000.0f / dc->frame_rate; while (dc->thread_running) { |