osquery-1/osquery
Alexander 5ef576a99c
Create a success and failure static factory for Status (#4627)
Consider this PR as a cosmetic one.

Creating Status class object in the code is not so clear. It is not so obvious that defatult costructed Status is success. Also it is not obvious that status with zero code is success and non-zero is failure.

To fix it I created 2 static methods to make construction of some particular status clear to reader.

* Use assert to check code in Status::failure in debut mode

* Rename success_code constant to kSuccessCode
according to style guide
2018-06-26 17:36:26 +01:00
..
carver moved from file(GLOB); added CMAKE_CURRENT_LIST_DIR to support include syntax (#4582) 2018-06-18 14:24:20 +01:00
config Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
core Create a success and failure static factory for Status (#4627) 2018-06-26 17:36:26 +01:00
database Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
devtools moved from file(GLOB); added CMAKE_CURRENT_LIST_DIR to support include syntax (#4582) 2018-06-18 14:24:20 +01:00
dispatcher Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
distributed Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
events events proof read (#4591) 2018-06-22 19:35:36 -07:00
examples Bundle C++ extensions into a single executable (#4335) 2018-06-03 02:04:36 +01:00
extensions Do not try to decode/encode utf-8 in python extensions (#4617) 2018-06-22 10:21:11 +01:00
filesystem updated another set of cmake files (#4622) 2018-06-21 18:43:22 +01:00
logger updated another set of cmake files (#4622) 2018-06-21 18:43:22 +01:00
main add recovery behavior to osqueryd Windows service (#4565) 2018-06-19 16:58:33 -04:00
registry Replace unsafe usages of 0 as nullptr (#4607) 2018-06-19 22:02:07 +01:00
remote updated another set of cmake files (#4622) 2018-06-21 18:43:22 +01:00
sql reworked part of cmake files (#4638) 2018-06-26 12:03:35 +01:00
tables reworked part of cmake files (#4638) 2018-06-26 12:03:35 +01:00
tests reorganized includes to improve compile time (#4445) 2018-05-30 00:17:40 +01:00
utils reworked part of cmake files (#4638) 2018-06-26 12:03:35 +01:00
CMakeLists.txt Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00