Merge pull request #231 from N-R-K/cppcheck_fixes

Cppcheck fixes
This commit is contained in:
Tatsuya Kinoshita
2022-04-25 19:49:34 +09:00
committed by GitHub
3 changed files with 5 additions and 2 deletions
+2
View File
@@ -105,6 +105,7 @@ Strnew_m_charp(const char *p, ...)
Strcat_charp(r, p);
p = va_arg(ap, char *);
}
va_end(ap);
return r;
}
@@ -276,6 +277,7 @@ Strcat_m_charp(Str x, ...)
va_start(ap, x);
while ((p = va_arg(ap, char *)) != NULL)
Strcat_charp_n(x, p, strlen(p));
va_end(ap);
}
void
+2 -1
View File
@@ -1457,7 +1457,8 @@ escKeyProc(int c, int esc, unsigned char *map)
esc |= (CurrentKey & ~0xFFFF);
}
CurrentKey = esc | c;
w3mFuncList[(int)map[c]].func();
if (map)
w3mFuncList[(int)map[c]].func();
}
DEFUN(escmap, ESCMAP, "ESC map")
+1 -1
View File
@@ -747,7 +747,7 @@ lc2c(longchar * x, int len)
int i = 0, j = 0;
char *r;
while (x[j].type != RE_TYPE_END && j < len) {
while (j < len && x[j].type != RE_TYPE_END) {
if (x[j].type == RE_WHICH_RANGE)
y[i++] = '-';
#ifdef USE_M17N