projects
/
ceph.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
779419a
)
denc: use scope_guard to close(fd)
27704/head
author
Kefu Chai
<kchai@redhat.com>
Tue, 23 Apr 2019 11:23:05 +0000
(19:23 +0800)
committer
Kefu Chai
<kchai@redhat.com>
Wed, 24 Apr 2019 08:26:07 +0000
(16:26 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/denc.h
patch
|
blob
|
history
diff --git
a/src/include/denc.h
b/src/include/denc.h
index c466854a12e8683ef6f0b24ea481e860cc22c1f2..af3b8db583c69fb9a5ecf758e130e61c70d72af7 100644
(file)
--- a/
src/include/denc.h
+++ b/
src/include/denc.h
@@
-41,6
+41,7
@@
#include "include/ceph_assert.h" // boost clobbers this
#include "include/intarith.h"
#include "include/int_types.h"
+#include "include/scope_guard.h"
#include "buffer.h"
#include "byteorder.h"
@@
-131,7
+132,6
@@
private:
size_t len = appender.get_pos() - start;
[[maybe_unused]] int r = ::write(fd, start, len);
}
- ::close(fd);
}
const char* name;
ceph::bufferlist::contiguous_appender& appender;