diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-11 16:13:16 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-11 16:13:16 +0000 |
commit | e6bb77fab7a8949a8690910bc455cf171ddb0e0f (patch) | |
tree | 0aea9343809625bf2c4f9233d743ebcdeca4d5da /usr.bin/tmux/status.c | |
parent | 8bc92ee092eadaa0b6814a734d1fc2635ef76eb9 (diff) |
Oops, these functions return a const char *, so make the local variable
const as well.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 3912ccd8b81..f71a0955864 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.65 2010/12/11 16:05:57 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.66 2010/12/11 16:13:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; |