remove the code that close negative descriptor
Signed-off-by: yangshukui <yangshukui@huawei.com>
This commit is contained in:
parent
6ca8b741bb
commit
5428532bdd
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue