[tracker/wip/carlosg/coverity-warnings: 16/27] libtracker-sparql: Minor code refactor
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/coverity-warnings: 16/27] libtracker-sparql: Minor code refactor
- Date: Fri, 26 Mar 2021 11:22:24 +0000 (UTC)
commit ca94f1d758d99792eb2fcc46b80d16b7b1361b20
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Mar 20 12:53:12 2021 +0100
libtracker-sparql: Minor code refactor
The error->domain checks are mutually exclusive, so do this in
if/else branches instead of separate ifs. This does not change
functionality, just made to help readability and coverity.
CID: #1501115
src/libtracker-sparql/tracker-error.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-error.c b/src/libtracker-sparql/tracker-error.c
index 849aa87db..78e08bd90 100644
--- a/src/libtracker-sparql/tracker-error.c
+++ b/src/libtracker-sparql/tracker-error.c
@@ -75,9 +75,7 @@ _translate_internal_error (GError *error)
TRACKER_SPARQL_ERROR_INTERNAL,
error->message);
}
- }
-
- if (error->domain == TRACKER_DB_INTERFACE_ERROR) {
+ } else if (error->domain == TRACKER_DB_INTERFACE_ERROR) {
TrackerSparqlError new_code = TRACKER_SPARQL_ERROR_INTERNAL;
switch (error->code) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]