From 00b9508e6b632102b0e5459b02d1be39c5450da2 Mon Sep 17 00:00:00 2001 From: Jaemin Ryu Date: Tue, 31 Oct 2017 14:39:08 +0900 Subject: [PATCH] Include device-policy-manager.h for the shared types Change-Id: I206eb0f64ce085f30ccd28728a41647983e6f4bb Signed-off-by: Jaemin Ryu --- api/usb.cpp | 6 ++++++ api/usb.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/usb.cpp b/api/usb.cpp index 1ce48f6..968c0b9 100644 --- a/api/usb.cpp +++ b/api/usb.cpp @@ -21,6 +21,12 @@ #include "usb.h" +#define RET_ON_FAILURE(cond, ret) \ +{ \ + if (!(cond)) \ + return (ret); \ +} + EXPORT_API int dpm_usb_set_debugging_state(device_policy_manager_h handle, bool allow) { RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER); diff --git a/api/usb.h b/api/usb.h index 1304392..eb36c99 100644 --- a/api/usb.h +++ b/api/usb.h @@ -19,7 +19,7 @@ #include -typedef void * device_policy_manager_h; +#include /** * @file usb.h -- 2.34.1