Reformat software keymaster with clang-format.
I'm going to be making extensive changes in these files so it's
convenient to apply clang-format up front so I can let it handle
formatting for the real work.
Also made them pass cpplint.py (except that cpplint wants me to name the
softkeymaster.h guard incorrectly).
Change-Id: I0f3717300c3536feabc38f0f0648aeb51bf77cee
diff --git a/softkeymaster/module.cpp b/softkeymaster/module.cpp
index cba3a79..bfb1dd5 100644
--- a/softkeymaster/module.cpp
+++ b/softkeymaster/module.cpp
@@ -29,7 +29,7 @@
#include <UniquePtr.h>
// For debugging
-//#define LOG_NDEBUG 0
+// #define LOG_NDEBUG 0
#define LOG_TAG "OpenSSLKeyMaster"
#include <cutils/log.h>
@@ -37,7 +37,7 @@
typedef UniquePtr<keymaster_device_t> Unique_keymaster_device_t;
/* Close an opened OpenSSL instance */
-static int openssl_close(hw_device_t *dev) {
+static int openssl_close(hw_device_t* dev) {
delete dev;
return 0;
}
@@ -45,8 +45,7 @@
/*
* Generic device handling
*/
-static int openssl_open(const hw_module_t* module, const char* name,
- hw_device_t** device) {
+static int openssl_open(const hw_module_t* module, const char* name, hw_device_t** device) {
if (strcmp(name, KEYSTORE_KEYMASTER) != 0)
return -EINVAL;
@@ -56,7 +55,7 @@
dev->common.tag = HARDWARE_DEVICE_TAG;
dev->common.version = 1;
- dev->common.module = (struct hw_module_t*) module;
+ dev->common.module = (struct hw_module_t*)module;
dev->common.close = openssl_close;
dev->flags = KEYMASTER_SOFTWARE_ONLY;
@@ -81,8 +80,7 @@
.open = openssl_open,
};
-struct keystore_module HAL_MODULE_INFO_SYM
-__attribute__ ((visibility ("default"))) = {
+struct keystore_module HAL_MODULE_INFO_SYM __attribute__((visibility("default"))) = {
.common = {
.tag = HARDWARE_MODULE_TAG,
.module_api_version = KEYMASTER_MODULE_API_VERSION_0_2,