Remove nonnullret deadcode: viminfo_readstring.

This commit is contained in:
Eliseo Martínez 2015-01-23 15:08:09 +01:00
parent d228b8a93e
commit 73c6bd8a42
2 changed files with 9 additions and 14 deletions

View File

@ -1447,8 +1447,6 @@ void copy_viminfo_marks(vir_T *virp, FILE *fp_out, int count, int eof, int flags
*/
str = skipwhite(line + 1);
str = viminfo_readstring(virp, (int)(str - virp->vir_line), FALSE);
if (str == NULL)
continue;
p = str + STRLEN(str);
while (p != str && (*p == NUL || vim_isspace(*p)))
p--;

View File

@ -4627,18 +4627,15 @@ int read_viminfo_search_pattern(vir_T *virp, int force)
hlsearch_on = TRUE;
if (idx >= 0) {
if (force || spats[idx].pat == NULL) {
val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1),
TRUE);
if (val != NULL) {
set_last_search_pat(val, idx, magic, setlast);
free(val);
spats[idx].no_scs = no_scs;
spats[idx].off.line = off_line;
spats[idx].off.end = off_end;
spats[idx].off.off = off;
if (setlast) {
SET_NO_HLSEARCH(!hlsearch_on);
}
val = viminfo_readstring(virp, (int)(lp - virp->vir_line + 1), TRUE);
set_last_search_pat(val, idx, magic, setlast);
free(val);
spats[idx].no_scs = no_scs;
spats[idx].off.line = off_line;
spats[idx].off.end = off_end;
spats[idx].off.off = off;
if (setlast) {
SET_NO_HLSEARCH(!hlsearch_on);
}
}
}