Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dbus: Always append valid bool values
D-Bus spec says bool values other than 1 and 0 are invalid. Although C++'s int->bool conversion converts all values other than 0 to 1, it's still possible to create bool variables with values other than 1 and 0. For example, when a variable is uninitialized, or with code like this: bool b; reinterpret_cast<int&>(b) = 10; BUG=767024 TEST=dbus_unittests Change-Id: I225456cb2662cffe992231f8f38a5add0dd2c250 Reviewed-on: https://chromium-review.googlesource.com/678537 Reviewed-by: Dan Erat <derat@chromium.org> Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#503995}
- Loading branch information