aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/dbus
diff options
context:
space:
mode:
authorEric Caruso <ejcaruso@chromium.org>2018-03-22 15:45:01 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-22 20:53:33 -0700
commit2b61f16f86b773f88ba69a7a15b6a33e132c3a58 (patch)
treecc147fba4838ab6a469a2570ffdf710217b8dfb1 /brillo/dbus
parent7b0a8b2186435c96e8e88a648d57378a21940645 (diff)
downloadplatform_external_libbrillo-2b61f16f86b773f88ba69a7a15b6a33e132c3a58.tar.gz
platform_external_libbrillo-2b61f16f86b773f88ba69a7a15b6a33e132c3a58.tar.bz2
platform_external_libbrillo-2b61f16f86b773f88ba69a7a15b6a33e132c3a58.zip
libbrillo: add default constructor for FileDescriptor
This allows us to default-construct the struct so a pointer to one can be passed to D-Bus callers as an out-argument. BUG=chromium:821633 TEST=compile new bindings with permission_broker Change-Id: I1c94d66c24d493a8e35c23724c316cb17bd22fa2 Reviewed-on: https://chromium-review.googlesource.com/976870 Commit-Ready: Eric Caruso <ejcaruso@chromium.org> Tested-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org>
Diffstat (limited to 'brillo/dbus')
-rw-r--r--brillo/dbus/file_descriptor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/brillo/dbus/file_descriptor.h b/brillo/dbus/file_descriptor.h
index f959d46..bcee136 100644
--- a/brillo/dbus/file_descriptor.h
+++ b/brillo/dbus/file_descriptor.h
@@ -13,6 +13,7 @@ namespace dbus_utils {
// a wrapper as possible to match the libchrome bindings below when this
// class is used by chromeos-dbus-bindings.
struct FileDescriptor {
+ FileDescriptor() : fd(-1) {}
FileDescriptor(int fd) : fd(fd) {}
inline FileDescriptor& operator=(int new_fd) {