summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-12-11 16:13:15 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-12-11 16:13:15 +0000
commit9802fea6152197c7887937c0d1e8637ae317443b (patch)
treeec4e9bcb21af95dc7bbe1a92ddd58b54993aa366 /status.c
parent7ce77ffc9c4973197377ecdfa329ba1cdd6af75e (diff)
Oops, these functions return a const char *, so make the local variable
const as well.
Diffstat (limited to 'status.c')
-rw-r--r--status.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/status.c b/status.c
index aac6c828..74316f2d 100644
--- a/status.c
+++ b/status.c
@@ -865,6 +865,7 @@ status_prompt_key(struct client *c, int key)
{
struct paste_buffer *pb;
char *s, *first, *last, word[64], swapc;
+ const char *histstr;
u_char ch;
size_t size, n, off, idx;
@@ -977,20 +978,20 @@ status_prompt_key(struct client *c, int key)
}
break;
case MODEKEYEDIT_HISTORYUP:
- s = status_prompt_up_history(&c->prompt_hindex);
- if (s == NULL)
+ histstr = status_prompt_up_history(&c->prompt_hindex);
+ if (histstr == NULL)
break;
xfree(c->prompt_buffer);
- c->prompt_buffer = xstrdup(s);
+ c->prompt_buffer = xstrdup(histstr);
c->prompt_index = strlen(c->prompt_buffer);
c->flags |= CLIENT_STATUS;
break;
case MODEKEYEDIT_HISTORYDOWN:
- s = status_prompt_down_history(&c->prompt_hindex);
- if (s == NULL)
+ histstr = status_prompt_down_history(&c->prompt_hindex);
+ if (histstr == NULL)
break;
xfree(c->prompt_buffer);
- c->prompt_buffer = xstrdup(s);
+ c->prompt_buffer = xstrdup(histstr);
c->prompt_index = strlen(c->prompt_buffer);
c->flags |= CLIENT_STATUS;
break;