analysis: FALSE/0 used in pointer context
While this is totally fine (0 in the pointer context will be converted in the right internal NULL representation, which could be a value with some bits to 1), I believe it's clearer to use NULL in the pointer context. It seems that, in most case, it's more an overlook than a deliberate choice to use FALSE/0 as NULL, eg. copying a _COGL_GET_CONTEXT (ctx, 0) or a g_return_val_if_fail (cond, 0) from a function returning a gboolean.
This commit is contained in:
@@ -207,7 +207,7 @@ clutter_script_flags_from_string (GType type,
|
||||
const gchar *flag;
|
||||
|
||||
g_return_val_if_fail (G_TYPE_IS_FLAGS (type), 0);
|
||||
g_return_val_if_fail (string != 0, 0);
|
||||
g_return_val_if_fail (string != NULL, 0);
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user