[libsocialweb] facebook: fix boolean expression
- From: Alban Crequy <albanc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsocialweb] facebook: fix boolean expression
- Date: Thu, 31 Mar 2011 15:35:11 +0000 (UTC)
commit d59f676666f76656306bb96cefec994e87121e02
Author: Alban Crequy <alban crequy collabora co uk>
Date: Tue Mar 29 10:55:39 2011 +0100
facebook: fix boolean expression
In general, "!a == b" is not the same as "a != b". In this case,
JSON_NODE_OBJECT equals 0, so it happened to work fine.
The data comes from an external source so it is not trusted.
services/facebook/facebook-item-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/services/facebook/facebook-item-view.c b/services/facebook/facebook-item-view.c
index 778e31b..024ac44 100644
--- a/services/facebook/facebook-item-view.c
+++ b/services/facebook/facebook-item-view.c
@@ -135,7 +135,7 @@ _facebook_status_node_to_item (SwItemView *self,
JsonObject *status_object;
JsonNode *from, *to;
- if (!json_node_get_node_type (status_node) == JSON_NODE_OBJECT)
+ if (json_node_get_node_type (status_node) != JSON_NODE_OBJECT)
return NULL;
status_object = json_node_get_object (status_node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]