summaryrefslogtreecommitdiff
path: root/src/scrollbar.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
commit3f375e63e26172b3c81f019055c4dfe606f99e63 (patch)
tree4173ad82b98203336ae4c82db2a183b3bdd2f0aa /src/scrollbar.c
parentc81f5795de828ab88232f5a7481437f17b9e6831 (diff)
downloadeterm-3f375e63e26172b3c81f019055c4dfe606f99e63.tar.gz
Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci This should convert all cases where there's a comparison to NULL to simpler forms. This patch applies the following transformations: code before patch ||code after patch =============================================================== return a == NULL; return !a; return a != NULL; return !!a; func(a == NULL); func(!a); func(a != NULL); func(!!a); b = a == NULL; b = !a; b = a != NULL; b = !!a; b = a == NULL ? c : d; b = !a ? c : d; b = a != NULL ? c : d; b = a ? c : d; other cases: a == NULL !a a != NULL a SVN revision: 51487
Diffstat (limited to 'src/scrollbar.c')
-rw-r--r--src/scrollbar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scrollbar.c b/src/scrollbar.c
index 1723931..2c3fc3b 100644
--- a/src/scrollbar.c
+++ b/src/scrollbar.c
@@ -357,7 +357,7 @@ sb_handle_motion_notify(event_t *ev)
unsigned char
scrollbar_dispatch_event(event_t *ev)
{
- if (scrollbar_event_data.handlers[ev->type] != NULL) {
+ if (scrollbar_event_data.handlers[ev->type]) {
return ((scrollbar_event_data.handlers[ev->type]) (ev));
}
return (0);