diff options
author | Max Kellermann <max@duempel.org> | 2008-09-15 13:27:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-15 13:27:30 +0200 |
commit | e7981e0e28541e5046c40879a4fdbcc308f143ec (patch) | |
tree | 86a4fe788f692321e6a6fbaff8d83708ba764234 /src/wreadln.c | |
parent | 6e81a1b3e08a423c6f4c6976aecae915bd1a3f0b (diff) | |
download | mpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.tar.gz mpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.tar.xz mpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.zip |
use size_t and unsigned integers
Diffstat (limited to '')
-rw-r--r-- | src/wreadln.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wreadln.c b/src/wreadln.c index e6bc61237..ed8ad9a39 100644 --- a/src/wreadln.c +++ b/src/wreadln.c @@ -66,7 +66,8 @@ static inline void cursor_move_right(gint *cursor, gint x1, gchar *line) { - if (*cursor < strlen(line) && *cursor < wrln_max_line_size - 1) { + if (*cursor < (int)strlen(line) && + *cursor < (int)wrln_max_line_size - 1) { (*cursor)++; if (*cursor + x0 >= x1 && *start < *cursor - width + 1) (*start)++; @@ -284,7 +285,7 @@ _wreadln(WINDOW *w, break; case KEY_DC: /* handle delete key. As above */ case KEY_CTRL_D: - if (cursor <= my_strlen(line) - 1) { + if (cursor <= (gint)my_strlen(line) - 1) { for (i = cursor; line[i] != 0; i++) line[i] = line[i + 1]; } |