Merge pull request #1533 from keloyang/close-negative-descriptor

Remove the code that close negative descriptor
This commit is contained in:
Michael Crosby 2017-07-25 09:47:54 -04:00 committed by GitHub
commit 5951cf5f36
1 changed files with 1 additions and 2 deletions

View File

@ -143,8 +143,7 @@ static int write_file(char *data, size_t data_len, char *pathfmt, ...)
fd = open(path, O_RDWR);
if (fd < 0) {
ret = -1;
goto out;
return -1;
}
len = write(fd, data, data_len);