[tracker] docs: Fix typo in examples
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] docs: Fix typo in examples
- Date: Tue, 15 Sep 2020 21:09:49 +0000 (UTC)
commit c74d348700bc26d5d4201d43a7cdbc73e4800252
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Sep 15 22:59:04 2020 +0200
docs: Fix typo in examples
The error checks are the wrong way around. Introduced in commits f8282a29e5
and 87e189d5a0. Spotted again by coverity.
docs/reference/libtracker-sparql/examples/writeonly-example.c | 2 +-
.../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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]