mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Remove nonnullret deadcode: xmalloc.
This commit is contained in:
parent
883e3a7a73
commit
00f18e2e09
@ -18162,8 +18162,7 @@ void func_dump_profile(FILE *fd)
|
||||
--todo;
|
||||
fp = HI2UF(hi);
|
||||
if (fp->uf_profiling) {
|
||||
if (sorttab != NULL)
|
||||
sorttab[st_len++] = fp;
|
||||
sorttab[st_len++] = fp;
|
||||
|
||||
if (fp->uf_name[0] == K_SPECIAL)
|
||||
fprintf(fd, "FUNCTION <SNR>%s()\n", fp->uf_name + 3);
|
||||
@ -18190,7 +18189,7 @@ void func_dump_profile(FILE *fd)
|
||||
}
|
||||
}
|
||||
|
||||
if (sorttab != NULL && st_len > 0) {
|
||||
if (st_len > 0) {
|
||||
qsort((void *)sorttab, (size_t)st_len, sizeof(ufunc_T *),
|
||||
prof_total_cmp);
|
||||
prof_sort_list(fd, sorttab, st_len, "TOTAL", FALSE);
|
||||
|
@ -1240,10 +1240,8 @@ theend:
|
||||
mf_put(mfp, hp, false, false);
|
||||
mf_close(mfp, false); /* will also free(mfp->mf_fname) */
|
||||
}
|
||||
if (buf != NULL) {
|
||||
free(buf->b_ml.ml_stack);
|
||||
free(buf);
|
||||
}
|
||||
free(buf->b_ml.ml_stack);
|
||||
free(buf);
|
||||
if (serious_error && called_from_main)
|
||||
ml_close(curbuf, TRUE);
|
||||
else {
|
||||
@ -3279,10 +3277,7 @@ findswapname (
|
||||
/*
|
||||
* we try different names until we find one that does not exist yet
|
||||
*/
|
||||
if (dir_name == NULL) /* out of memory */
|
||||
fname = NULL;
|
||||
else
|
||||
fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
|
||||
fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
|
||||
|
||||
for (;; ) {
|
||||
if (fname == NULL) /* must be out of memory */
|
||||
|
@ -3466,8 +3466,6 @@ get_cmd_output (
|
||||
i = (int)fread((char *)buffer, (size_t)1, (size_t)len, fd);
|
||||
fclose(fd);
|
||||
os_remove((char *)tempname);
|
||||
if (buffer == NULL)
|
||||
goto done;
|
||||
if (i != len) {
|
||||
EMSG2(_(e_notread), tempname);
|
||||
free(buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user