Skip to content

Stop writing out '== NULL' and '!= NULL'

Michael Catanzaro requested to merge mcatanzaro/#72 into master

Currently glib-networking code style is inconsistent on whether to test for NULL using !pointer or pointer == NULL. This is harmful because it forces us to think and make a decision each time when writing such conditions.

We have somewhat-arbitrarily agreed to stop writing this out longways. The tiebreaker is the C++ core guidelines (endorsed by the C++ standardization people):

http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es87-dont-add-redundant--or--to-conditions

glib-networking is not C++, but the decision either way is arbitrary, so this seems like as good a tiebreaker as any. Also, WebKit requires it this way, and therefore so does Epiphany.

Fixes #72 (closed)

Merge request reports