diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-09-07 18:14:21 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-09-14 12:14:28 +0200 |
commit | f8282a29e5c3c750a5cb6979131d42c41c50abdc (patch) | |
tree | 9f8ebe49a68e0cecdab1477737f7b7105df9f834 /docs | |
parent | 87e189d5a0bb033ce03628820dd1dea670860125 (diff) | |
download | tracker-f8282a29e5c3c750a5cb6979131d42c41c50abdc.tar.gz |
docs: Avoid dead expressions in code examples
Spotted by Coverity.
CID: #1491750
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/libtracker-sparql/examples/writeonly-example.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/reference/libtracker-sparql/examples/writeonly-example.c b/docs/reference/libtracker-sparql/examples/writeonly-example.c index ed7fc0084..94104c3d7 100644 --- a/docs/reference/libtracker-sparql/examples/writeonly-example.c +++ b/docs/reference/libtracker-sparql/examples/writeonly-example.c @@ -17,9 +17,9 @@ int main (int argc, const char **argv) "}"; connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker3.Miner.Files", NULL, NULL, &error); - if (!connection) { + if (!error) { g_printerr ("Couldn't obtain a connection to the Tracker store: %s", - error ? error->message : "unknown error"); + error->message); g_clear_error (&error); return 1; @@ -33,7 +33,7 @@ int main (int argc, const char **argv) if (error) { /* Some error happened performing the query, not good */ g_printerr ("Couldn't update the Tracker store: %s", - error ? error->message : "unknown error"); + error->message); g_clear_error (&error); g_object_unref (connection); |