summaryrefslogtreecommitdiff
path: root/usr.bin/less/search.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-11-21 13:29:13 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-11-21 13:29:13 +0000
commit220c6848dfec8c3ff3cec20c18ff0666e951acac (patch)
tree3d8ffff583f943f8da676939395e8ebd14c59be1 /usr.bin/less/search.c
parentc4c367bc31017c412a565baaea4da79639cb1e56 (diff)
remove fancy null check function in favor of checking for null.
from Ricardo Mestre
Diffstat (limited to 'usr.bin/less/search.c')
-rw-r--r--usr.bin/less/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/less/search.c b/usr.bin/less/search.c
index 7c7b5a3408e..f8b379875ee 100644
--- a/usr.bin/less/search.c
+++ b/usr.bin/less/search.c
@@ -177,7 +177,7 @@ static int
prev_pattern(struct pattern_info *info)
{
if ((info->search_type & SRCH_NO_REGEX) == 0)
- return (!is_null_pattern(info->compiled));
+ return (info->compiled != NULL);
return (info->text != NULL);
}