Clarified handling of file descriptor. Coverity CID 28753.

This commit is contained in:
Thomas Schmitt 2015-11-03 15:09:22 +00:00
parent 87b82c891b
commit b8c2eb2e6c
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -668,7 +668,7 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
break;
}
}
if(write_fd > 0)
if(write_fd != -1)
close(write_fd);
write_fd= -1;
if(todo > 0 && xorriso->extract_error_mode == 2 && open_path_pt != NULL) {
@ -779,7 +779,7 @@ restore_properties:;
if(todo < 0)
ret= 0;
ex:;
if(write_fd >= 0) {
if(write_fd != -1) {
close(write_fd);
if(ret <= 0 && xorriso->extract_error_mode == 2 && open_path_pt != NULL)
unlink(open_path_pt);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.03.145920"
#define Xorriso_timestamP "2015.11.03.150839"