mirror of
https://github.com/brl/mutter.git
synced 2025-03-28 06:03:47 +00:00
analysis: ClutterAnimator/1
Do not de-reference a void*; use a temporary variable -- after checking the contents of the pointer. This actually simplifies the readability and avoids pulling a Lisp with the parentheses.
This commit is contained in:
parent
fcd3cfc0bf
commit
667222c301
@ -551,6 +551,7 @@ static gfloat
|
|||||||
list_try_get_rel (GList *list,
|
list_try_get_rel (GList *list,
|
||||||
gint count)
|
gint count)
|
||||||
{
|
{
|
||||||
|
ClutterAnimatorKey *key;
|
||||||
GList *iter = list;
|
GList *iter = list;
|
||||||
GList *best = list;
|
GList *best = list;
|
||||||
|
|
||||||
@ -575,7 +576,14 @@ list_try_get_rel (GList *list,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_value_get_float (&(((ClutterAnimatorKey *)best->data)->value));
|
if (best != NULL && best->data != NULL)
|
||||||
|
{
|
||||||
|
key = best->data;
|
||||||
|
|
||||||
|
return g_value_get_float (&(key->value));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user