* src/image.c (anim_prune_animation_cache):
Prefer NILP (x) to EQ (x, Qnil).
* admin/coccinelle/nilp.cocci: Semantic patch for above change.
(cherry picked from commit
88ed501abe9666fced46703613c000c26e450ad8)
--- /dev/null
+// Prefer NILP (x) to EQ (x, Qnil)
+@@
+expression X;
+@@
+- EQ (X, Qnil)
++ NILP (X)
{
struct anim_cache *cache = *pcache;
if (EQ (clear, Qt)
- || (EQ (clear, Qnil) && timespec_cmp (old, cache->update_time) > 0)
+ || (NILP (clear) && timespec_cmp (old, cache->update_time) > 0)
|| EQ (clear, cache->spec))
{
if (cache->handle)