aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-07-24 21:12:01 +0200
committercbdev <cb@cbcdn.com>2019-07-24 21:12:01 +0200
commit59857ead2d439d450afc6f5144c9c08e8d0c8a5c (patch)
tree4a72e4af05b4359f3437c40172df3bec9ef1c520 /backends
parent5bd8e81e2821f1378c6773fbc1f06df063dbbd22 (diff)
downloadmidimonster-59857ead2d439d450afc6f5144c9c08e8d0c8a5c.tar.gz
midimonster-59857ead2d439d450afc6f5144c9c08e8d0c8a5c.tar.bz2
midimonster-59857ead2d439d450afc6f5144c9c08e8d0c8a5c.zip
Fix issues found by Coverity Scan
Diffstat (limited to 'backends')
-rw-r--r--backends/lua.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/lua.c b/backends/lua.c
index 8e221d1..4d946cd 100644
--- a/backends/lua.c
+++ b/backends/lua.c
@@ -61,7 +61,7 @@ static uint32_t lua_interval(){
}
static int lua_update_timerfd(){
- uint64_t interval, gcd, residual;
+ uint64_t interval = 0, gcd, residual;
size_t n = 0;
#ifdef MMBACKEND_LUA_TIMERFD
struct itimerspec timer_config = {
@@ -396,11 +396,11 @@ static int lua_handle(size_t num, managed_fd* fds){
return 1;
}
#else
- if(!last_timestamp){
- last_timestamp = mm_timestamp();
- }
- delta = mm_timestamp() - last_timestamp;
+ if(!last_timestamp){
last_timestamp = mm_timestamp();
+ }
+ delta = mm_timestamp() - last_timestamp;
+ last_timestamp = mm_timestamp();
#endif
//no timers active