Merge pull request #1497 from splinterofchaos/const-attr

constify and func-attribute memory.c and strings.c
This commit is contained in:
Justin M. Keyes
2014-11-29 22:48:23 -05:00
9 changed files with 93 additions and 72 deletions

View File

@@ -1813,10 +1813,10 @@ void ex_loadkeymap(exarg_T *eap)
if ((*p != '"') && (*p != NUL)) {
kmap_T *kp = GA_APPEND_VIA_PTR(kmap_T, &curbuf->b_kmap_ga);
s = skiptowhite(p);
kp->from = vim_strnsave(p, (int)(s - p));
kp->from = vim_strnsave(p, (size_t)(s - p));
p = skipwhite(s);
s = skiptowhite(p);
kp->to = vim_strnsave(p, (int)(s - p));
kp->to = vim_strnsave(p, (size_t)(s - p));
if ((STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN)
|| (*kp->from == NUL)