Prefer NILP (x) to EQ (x, Qnil)
* src/image.c (anim_prune_animation_cache): Prefer NILP (x) to EQ (x, Qnil). * admin/coccinelle/nilp.cocci: Semantic patch for above change.
This commit is contained in:
parent
bdfa49502a
commit
88ed501abe
2 changed files with 7 additions and 1 deletions
6
admin/coccinelle/nilp.cocci
Normal file
6
admin/coccinelle/nilp.cocci
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Prefer NILP (x) to EQ (x, Qnil)
|
||||
@@
|
||||
expression X;
|
||||
@@
|
||||
- EQ (X, Qnil)
|
||||
+ NILP (X)
|
|
@ -3561,7 +3561,7 @@ anim_prune_animation_cache (Lisp_Object clear)
|
|||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue