浏览代码

Factorize error messages

master
父节点
当前提交
4f65ef9804
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. +4
    -8
      src/fmail.c

+ 4
- 8
src/fmail.c 查看文件

@ -458,16 +458,12 @@ read_input_from_editor(void)
int fd;
FILE *f;
if ( asprintf(&filename, "%s/fmailXXXXXX", get_tmp_dir()) == -1 )
if ( asprintf(&filename, "%s/fmailXXXXXX", get_tmp_dir()) == -1
|| (fd = mkstemp(filename)) == -1 )
err(EXIT_FAILURE, "cannot create temporary file");
if ( (fd = mkstemp(filename)) == -1 )
err(EXIT_FAILURE, "cannot create temporary file");
if ( asprintf(&command, "%s %s", get_editor(), filename) == -1 )
err(EXIT_FAILURE, "cannot execute editor");
if ( system(command) == -1 )
if ( asprintf(&command, "%s %s", get_editor(), filename) == -1
|| system(command) == -1 )
err(EXIT_FAILURE, "cannot execute editor");
if ( (f = fdopen(fd, "r")) == NULL )


正在加载...
取消
保存