diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-09-15 22:59:04 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-09-15 23:04:24 +0200 |
commit | c74d348700bc26d5d4201d43a7cdbc73e4800252 (patch) | |
tree | 44b3f5b46d81940891778819be63e29e54c431db | |
parent | 1f7a6afbeb2001f7d2202139c6345edc541afc60 (diff) | |
download | tracker-c74d348700bc26d5d4201d43a7cdbc73e4800252.tar.gz |
docs: Fix typo in examples
The error checks are the wrong way around. Introduced in commits f8282a29e5
and 87e189d5a0. Spotted again by coverity.
-rw-r--r-- | docs/reference/libtracker-sparql/examples/writeonly-example.c | 2 | ||||
-rw-r--r-- | docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/reference/libtracker-sparql/examples/writeonly-example.c b/docs/reference/libtracker-sparql/examples/writeonly-example.c index 94104c3d7..6a08b6adc 100644 --- a/docs/reference/libtracker-sparql/examples/writeonly-example.c +++ b/docs/reference/libtracker-sparql/examples/writeonly-example.c @@ -17,7 +17,7 @@ int main (int argc, const char **argv) "}"; connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker3.Miner.Files", NULL, NULL, &error); - if (!error) { + if (error) { g_printerr ("Couldn't obtain a connection to the Tracker store: %s", error->message); g_clear_error (&error); diff --git a/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c b/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c index 558c7e55d..49a839243 100644 --- a/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c +++ b/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c @@ -9,7 +9,7 @@ int main (int argc, const char **argv) "INSERT { _:foo a nie:InformationElement } WHERE { ?x a rdfs:Class }"; connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1", NULL, NULL, &error); - if (!error) { + if (error) { g_printerr ("Couldn't obtain a connection to the Tracker store: %s", error->message); g_clear_error (&error); |