Hi Patrik,
On 03.10.2012 09:17, Patrik Flykt wrote:
On tis, 2012-10-02 at 17:02 +0200, Daniel Wagner wrote:
+M17: Always explicitly initialize static variables
+==================================================
+Any static declared value need to be assign the initial value.
+
+Exmaple:
+
+static GHastTable *driver_hash = NULL;
+static int owner_watch = 0;
It is true that ConnMan is inconsistent in initializing static
variables, but I don't see any readability benefits from explicit
initializations either.
Me neither. Up to now there was the unwritten rule to initialize at
least the pointers. As Lucas pointed out the other project do not do this.
I am also fine to do the exact opposite and remove all the unnecessary
initializations.
So why not leave it in the state it is right
now,
What's the problem to fix it now? I rather have it fixed it now and be
done with it.
and for new or fixed code do the initialization whenever it helps
code readability and understanding?
I think we should really follow the rest of the projects in this respect
and do the cleanup now.
cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman