From 2a0b4dfbc416b24761fed67362c7292228bce031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Bouchaud=20=28yoz=29?= Date: Wed, 2 Nov 2016 15:27:17 +0100 Subject: [PATCH] mixer: fix coverity issues --- src/modules/mixer/e_mod_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index e3a377314..29cb04656 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -387,7 +387,7 @@ _actions_unregister(void) mixer_context->actions.decr_app = NULL; } - if (mixer_context->actions.incr_app) + if (mixer_context->actions.mute_app) { e_action_predef_name_del("Mixer", _("Mute Volume of Focuse Application")); @@ -890,7 +890,7 @@ _get_ppid(pid_t pid) ERR("Can't open %s, maybee the process exited.", buf); return -1; } - read(fd, buf, sizeof(buf)); + if ((read(fd, buf, sizeof(buf))) < 4) return -1; buf[sizeof(buf) - 1] = '0'; s = strrchr(buf, ')'); s += 3;