Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'

- replace alloc with xmalloc
This commit is contained in:
Justin M. Keyes
2014-05-22 12:50:59 -04:00
55 changed files with 937 additions and 1643 deletions

View File

@@ -2235,9 +2235,8 @@ setfname (
close_buffer(NULL, obuf, DOBUF_WIPE, FALSE);
}
sfname = vim_strsave(sfname);
if (ffname == NULL || sfname == NULL) {
if (ffname == NULL) {
free(sfname);
free(ffname);
return FAIL;
}
#ifdef USE_FNAME_CASE
@@ -4114,8 +4113,6 @@ chk_modeline (
while (s[-1] != ':');
s = linecopy = vim_strsave(s); /* copy the line, it will change */
if (linecopy == NULL)
return FAIL;
save_sourcing_lnum = sourcing_lnum;
save_sourcing_name = sourcing_name;