system-monitor: fixed a potentially uninitialized variable warning.
authorKrisztian Litkey <kli@iki.fi>
Thu, 23 Oct 2014 13:26:13 +0000 (16:26 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:18 +0000 (18:37 +0200)
Change-Id: Ib6e0384b442dd62cb4121f899a2a66b8b9b7d408

src/plugins/system-monitor/process-watch.c

index d38c9f8..b4dab19 100644 (file)
@@ -330,7 +330,8 @@ int process_event_mask(lua_State *L, int idx)
     mask = 0;
     MRP_LUA_FOREACH_ALL(L, i, idx, ktype, name, len) {
         if (ktype != LUA_TNUMBER || (type = lua_type(L, -1)) != LUA_TSTRING) {
-            mrp_log_warning("ignoring invalid event (0x%x: 0x%x)", ktype, type);
+            mrp_log_warning("ignoring invalid event (0x%x: 0x%x)", ktype,
+                            ktype == LUA_TNUMBER ? type : 0);
             continue;
         }
         else