projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e23e29
)
btrfs-progs: don't call close on error fd
author
Eric Sandeen
<sandeen@redhat.com>
Mon, 25 Feb 2013 22:54:43 +0000
(16:54 -0600)
committer
David Sterba
<dsterba@suse.cz>
Wed, 27 Feb 2013 13:39:45 +0000
(14:39 +0100)
In the error case where fd < 0, close(fd) is the wrong
thing to do.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
btrfs-show-super.c
patch
|
blob
|
history
diff --git
a/btrfs-show-super.c
b/btrfs-show-super.c
index 3614c52743f2a549cc205b0892d66eda26b38c72..f587f106ee7a4a40e302fd2b8f14d36ad6ef82ae 100644
(file)
--- a/
btrfs-show-super.c
+++ b/
btrfs-show-super.c
@@
-97,7
+97,6
@@
int main(int argc, char **argv)
fd = open(filename, O_RDONLY, 0666);
if (fd < 0) {
fprintf(stderr, "Could not open %s\n", filename);
- close(fd);
exit(1);
}