diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-02-01 15:58:44 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-02-01 15:58:44 +0100 |
commit | 058e0d3144b32d048c2a7637447881256e4c9997 (patch) | |
tree | 4190e018528d9f2f9a4a05398468da5d8a0de526 /src/applet/test_report.c | |
parent | 876664f002c5f90e5722602956a6d60591619680 (diff) | |
download | abrt-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/applet/test_report.c')
-rw-r--r-- | src/applet/test_report.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/applet/test_report.c b/src/applet/test_report.c index 80cf3c73..dada106e 100644 --- a/src/applet/test_report.c +++ b/src/applet/test_report.c @@ -51,7 +51,7 @@ int main(int argc, char** argv) struct run_event_state *run_state = new_run_event_state(); run_state->logging_callback = do_log; int r = run_event_on_dir_name(run_state, dir_name, event); - if (r == -1) + if (r == 0 && run_state->children_count == 0) printf("No actions are found for event '%s'\n", event); free_run_event_state(run_state); |