summaryrefslogtreecommitdiffstats
path: root/Src/Zle
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2008-05-05 01:14:04 +0000
committerWayne Davison <wayned@users.sourceforge.net>2008-05-05 01:14:04 +0000
commitf7b2570e158e8fbf84c8a96bced4f9866feeb753 (patch)
treec114ceec60e94a9433772af5ff207383c0b283d0 /Src/Zle
parentMikael Magnusson: 24911 (slightly tweaked): (diff)
downloadzsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar.gz
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar.bz2
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar.lz
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar.xz
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.tar.zst
zsh-f7b2570e158e8fbf84c8a96bced4f9866feeb753.zip
Locking simplification and signed/unsigned fixes.
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_hist.c4
-rw-r--r--Src/Zle/zle_move.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 0a4ead788..54c103f60 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1316,7 +1316,7 @@ doisearch(char **args, int dir, int pattern)
zlemetaline + pos,
NULL) - zlemetaline;
} else if (sbuf[0] != '^') {
- if (pos >= strlen(zt) - 1)
+ if (pos >= (int)strlen(zt) - 1)
skip_line = 1;
else
pos += 1;
@@ -1598,7 +1598,7 @@ doisearch(char **args, int dir, int pattern)
zlemetacs, sbptr, dir, nomatch);
if (sbptr >= sibuf - FIRST_SEARCH_CHAR - 2
#ifdef MULTIBYTE_SUPPORT
- - 2 * MB_CUR_MAX
+ - 2 * (int)MB_CUR_MAX
#endif
) {
ibuf = hrealloc(ibuf, sibuf, sibuf * 2);
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index 5b02616a2..f15b114f5 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -209,8 +209,8 @@ backwardmetafiedchar(char *start, char *endptr, convchar_t *retchr)
return ptr;
}
}
- if (ret >= 0) {
- if (ret < charlen) {
+ if (ret != (size_t)-1) {
+ if (ret < (size_t)charlen) {
/* The last character didn't convert, so use it raw. */
break;
}