remove the code that close negative descriptor

Signed-off-by: yangshukui <yangshukui@huawei.com>
This commit is contained in:
yangshukui 2017-07-24 11:10:18 +08:00
parent 6ca8b741bb
commit 5428532bdd
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);