summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2016-01-17 00:59:10 +0000
committermmcc <mmcc@cvs.openbsd.org>2016-01-17 00:59:10 +0000
commitec657ff6e3fa1f7132495fe421c4287728e6284a (patch)
tree90a1aa726f7a23c0e2a64f2cb437cf4293207161
parentc0df302c38331e83c6bb8a6e5417cf835006fe2f (diff)
start removing mp, the pointer to message's nul byte
ok deraadt@
-rw-r--r--usr.bin/less/prompt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/prompt.c b/usr.bin/less/prompt.c
index 804696d16d7..e321e36c2d5 100644
--- a/usr.bin/less/prompt.c
+++ b/usr.bin/less/prompt.c
@@ -174,7 +174,7 @@ cond(char c, int where)
switch (c) {
case 'a': /* Anything in the message yet? */
- return (mp > message);
+ return (*message != '\0');
case 'b': /* Current byte offset known? */
return (curr_byte(where) != -1);
case 'c':
@@ -478,7 +478,7 @@ pr_expand(const char *proto, int maxwidth)
}
}
- if (mp == message)
+ if (*message == '\0')
return ("");
if (maxwidth > 0 && mp >= message + maxwidth) {
/*