diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2016-01-17 00:59:10 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2016-01-17 00:59:10 +0000 |
commit | ec657ff6e3fa1f7132495fe421c4287728e6284a (patch) | |
tree | 90a1aa726f7a23c0e2a64f2cb437cf4293207161 | |
parent | c0df302c38331e83c6bb8a6e5417cf835006fe2f (diff) |
start removing mp, the pointer to message's nul byte
ok deraadt@
-rw-r--r-- | usr.bin/less/prompt.c | 4 |
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) { /* |