From: Chengyi Zhao <[email protected]>
---
doc/coding-style.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/coding-style.txt b/doc/coding-style.txt
index ae40180..97410ce 100644
--- a/doc/coding-style.txt
+++ b/doc/coding-style.txt
@@ -51,7 +51,7 @@ b = 3;
The only exception to this rule applies when a variable is being allocated:
array = g_try_new0(int, 20);
-if (array) // Correct
+if (!array) // Correct
return;
@@ -94,7 +94,7 @@ if (call->status == CALL_STATUS_ACTIVE ||
3)
gboolean sim_ust_is_available(unsigned char *service_ust, unsigned char len,
- num sim_ust_service index) // wrong
+ enum sim_ust_service index) // wrong
{
int a;
...
@@ -162,7 +162,7 @@ the expected behavior, and you may want to use g_try_malloc
instead.
Example:
additional = g_try_malloc(len - 1); // correct
-if (additional)
+if (!additional)
return FALSE;
--
1.8.1.2
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman