summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-26 22:57:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-26 22:57:00 +0000
commitbba831e1bed7dd053a6ca376203d72ecdc616b3d (patch)
tree5b0c422fb030817f105d197937951b2ae581efce /usr.bin/tmux
parent5be517bb84b1d1cf4b7acffe7c1d74c6db9b9f52 (diff)
Make types clearer and lint happier.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/key-string.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c
index 6b5570dc596..6e61d5c9430 100644
--- a/usr.bin/tmux/key-string.c
+++ b/usr.bin/tmux/key-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-string.c,v 1.10 2009/11/10 17:24:43 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.11 2009/11/26 22:56:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -105,12 +105,12 @@ int
key_string_lookup_string(const char *string)
{
int key;
- const u_char *ptr;
+ const char *ptr;
if (string[0] == '\0')
return (KEYC_NONE);
if (string[1] == '\0')
- return (string[0]);
+ return ((u_char) string[0]);
ptr = NULL;
if ((string[0] == 'C' || string[0] == 'c') && string[1] == '-')
@@ -133,7 +133,7 @@ key_string_lookup_string(const char *string)
} else {
if (ptr[1] != '\0')
return (KEYC_NONE);
- key = ptr[0];
+ key = (u_char) ptr[0];
}
/*
@@ -162,7 +162,7 @@ key_string_lookup_string(const char *string)
} else {
if (ptr[1] == '\0')
return (KEYC_NONE);
- key = ptr[0];
+ key = (u_char) ptr[0];
}
if (key >= 32 && key <= 127)
@@ -209,7 +209,7 @@ key_string_lookup_key(int key)
}
if (key >= 32 && key <= 255) {
- tmp[0] = key;
+ tmp[0] = (char) key;
tmp[1] = '\0';
return (tmp);
}