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:
Damien Lespiau
2010-05-27 08:28:29 +01:00
parent 9d428278f7
commit 52a78a7220
13 changed files with 27 additions and 27 deletions

View File

@@ -1091,8 +1091,8 @@ clutter_script_lookup_filename (ClutterScript *script,
gchar *dirname;
gchar *retval;
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), NULL);
g_return_val_if_fail (filename != NULL, NULL);
if (g_path_is_absolute (filename))
return g_strdup (filename);