summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-02-01 15:58:44 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-02-01 15:58:44 +0100
commit058e0d3144b32d048c2a7637447881256e4c9997 (patch)
tree4190e018528d9f2f9a4a05398468da5d8a0de526 /src/lib
parent876664f002c5f90e5722602956a6d60591619680 (diff)
downloadabrt-058e0d3144b32d048c2a7637447881256e4c9997.tar.gz
abrt-058e0d3144b32d048c2a7637447881256e4c9997.tar.xz
abrt-058e0d3144b32d048c2a7637447881256e4c9997.zip
use run_state->children_count == 0 check for "event not conf'd" condition
run_event_on_FOO() was returning -1 when it found that not even one program was run on the requested event. Which is not a very natural return value: in many cases this isn't an error. This change makes it return 0 in this case. It is ok since now we have run_state->children_count member which can be checked for 0 by those callers which want to detect this condition. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/run_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/run_event.c b/src/lib/run_event.c
index a14b42ca..6efc51da 100644
--- a/src/lib/run_event.c
+++ b/src/lib/run_event.c
@@ -53,7 +53,7 @@ static int run_event_helper(struct run_event_state *state,
setenv("EVENT", event, 1);
/* Read, match, and execute lines from abrt_event.conf */
- int retval = -1;
+ int retval = 0;
struct dump_dir *dd = NULL;
char *next_line = xmalloc_fgetline(conffile);
while (next_line)