summaryrefslogtreecommitdiffstats
path: root/lib/plugins/Bugzilla.cpp
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-08-31 17:19:02 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-08-31 17:19:02 +0200
commit824dbc97127452bf7783d6f9e8eb66e00a41589c (patch)
treec95267e9700460c88818a5234f5ba79710b36af9 /lib/plugins/Bugzilla.cpp
parentff2431f950dcd34be56ea149e07f717a2137f3c7 (diff)
downloadabrt-824dbc97127452bf7783d6f9e8eb66e00a41589c.tar.gz
abrt-824dbc97127452bf7783d6f9e8eb66e00a41589c.tar.xz
abrt-824dbc97127452bf7783d6f9e8eb66e00a41589c.zip
remove one redundant check
Signed-off-by: Kamil Dudka <kdudka@redhat.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'lib/plugins/Bugzilla.cpp')
-rw-r--r--lib/plugins/Bugzilla.cpp60
1 files changed, 28 insertions, 32 deletions
diff --git a/lib/plugins/Bugzilla.cpp b/lib/plugins/Bugzilla.cpp
index f10baff6..6e5ffd9c 100644
--- a/lib/plugins/Bugzilla.cpp
+++ b/lib/plugins/Bugzilla.cpp
@@ -504,45 +504,41 @@ int ctx::get_bug_info(struct bug_info* bz, xmlrpc_int32 bug_id)
if (!result)
return -1;
- if (result)
- {
- bz->bug_product = get_bug_product(result);
- if (bz->bug_product == NULL)
- return -1;
-
- bz->bug_status = get_bug_status(result);
- if (bz->bug_status == NULL)
- return -1;
+ bz->bug_product = get_bug_product(result);
+ if (bz->bug_product == NULL)
+ return -1;
- bz->bug_reporter = get_bug_reporter(result);
- if (bz->bug_reporter == NULL)
- return -1;
+ bz->bug_status = get_bug_status(result);
+ if (bz->bug_status == NULL)
+ return -1;
- // mandatory when bug status is CLOSED
- if (strcmp(bz->bug_status, "CLOSED") == 0)
- {
- bz->bug_resolution = get_bug_resolution(result);
- if ((env.fault_occurred) && (bz->bug_resolution == NULL))
- return -1;
- }
+ bz->bug_reporter = get_bug_reporter(result);
+ if (bz->bug_reporter == NULL)
+ return -1;
- // mandatory when bug status is CLOSED and resolution is DUPLICATE
- if ((strcmp(bz->bug_status, "CLOSED") == 0)
- && (strcmp(bz->bug_resolution, "DUPLICATE") == 0)
- ) {
- bz->bug_dup_id = get_bug_dup_id(result);
- if (env.fault_occurred)
- return -1;
- }
+ // mandatory when bug status is CLOSED
+ if (strcmp(bz->bug_status, "CLOSED") == 0)
+ {
+ bz->bug_resolution = get_bug_resolution(result);
+ if ((env.fault_occurred) && (bz->bug_resolution == NULL))
+ return -1;
+ }
- get_bug_cc(result, bz);
+ // mandatory when bug status is CLOSED and resolution is DUPLICATE
+ if ((strcmp(bz->bug_status, "CLOSED") == 0)
+ && (strcmp(bz->bug_resolution, "DUPLICATE") == 0)
+ ) {
+ bz->bug_dup_id = get_bug_dup_id(result);
if (env.fault_occurred)
return -1;
+ }
- xmlrpc_DECREF(result);
- return 0;
- }
- return -1;
+ get_bug_cc(result, bz);
+ if (env.fault_occurred)
+ return -1;
+
+ xmlrpc_DECREF(result);
+ return 0;
}
//-------------------------------------------------------------------