Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8a21209 authored by Myles Watson's avatar Myles Watson
Browse files

Apply clang-format to the rest of the tree

find * | grep "\.[ch]" | xargs clang-format --style=file -i

Test: mma -j32
Change-Id: I6fcc9862bb7bc07c2a367ca58fef2b3cd27a6f05
parent cd1165cf
Loading
Loading
Loading
Loading
+946 −1042

File changed.

Preview size limit exceeded, changes collapsed.

+16 −15
Original line number Diff line number Diff line
@@ -18,10 +18,11 @@

#include "audio_a2dp_hw.h"

#define CASE_RETURN_STR(const) case const: return #const;
#define CASE_RETURN_STR(const) \
  case const:                  \
    return #const;

const char* audio_a2dp_hw_dump_ctrl_event(tA2DP_CTRL_CMD event)
{
const char* audio_a2dp_hw_dump_ctrl_event(tA2DP_CTRL_CMD event) {
  switch (event) {
    CASE_RETURN_STR(A2DP_CTRL_CMD_NONE)
    CASE_RETURN_STR(A2DP_CTRL_CMD_CHECK_READY)
+5 −5
Original line number Diff line number Diff line
@@ -1139,8 +1139,8 @@ bool bta_av_hdl_event(BT_HDR* p_msg) {
    /* non state machine events */
    (*bta_av_nsm_act[p_msg->event - BTA_AV_FIRST_NSM_EVT])(
        (tBTA_AV_DATA*)p_msg);
  } else if (p_msg->event >= BTA_AV_FIRST_SM_EVT
      && p_msg->event <= BTA_AV_LAST_SM_EVT) {
  } else if (p_msg->event >= BTA_AV_FIRST_SM_EVT &&
             p_msg->event <= BTA_AV_LAST_SM_EVT) {
    APPL_TRACE_VERBOSE("%s: AV sm event=0x%x(%s)", __func__, p_msg->event,
                       bta_av_evt_code(p_msg->event));
    /* state machine events */
+9 −7
Original line number Diff line number Diff line
@@ -50,9 +50,11 @@ bt_bdaddr_t *bdaddr_copy(bt_bdaddr_t *dest, const bt_bdaddr_t *src);
// refers to the size of |string|'s buffer and must be >= 18. On success, this
// function returns |string|, otherwise it returns NULL. Neither |addr| nor
// |string| may be NULL.
const char *bdaddr_to_string(const bt_bdaddr_t *addr, char *string, size_t size);
const char* bdaddr_to_string(const bt_bdaddr_t* addr, char* string,
                             size_t size);

// Returns true if |string| represents a Bluetooth address. |string| may not be NULL.
// Returns true if |string| represents a Bluetooth address. |string| may not be
// NULL.
bool string_is_bdaddr(const char* string);

// Converts |string| to bt_bdaddr_t and places it in |addr|. If |string| does
+32 −29
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@ void device_class_from_stream(bt_device_class_t *dc, const uint8_t *data);
// Serializes the device class |dc| to pointer argument |data| in big endian
// format.  |len| must contain the buffer size of |data|.  Returns the actual
// number of bytes copied into |data|.  |dc| and |data| must not be NULL.
int device_class_to_stream(const bt_device_class_t *dc, uint8_t *data, size_t len);
int device_class_to_stream(const bt_device_class_t* dc, uint8_t* data,
                           size_t len);

// Copies the |data| class of device integer into device class |dc|.  |dc|
// must not be NULL.
@@ -53,13 +54,15 @@ int device_class_to_int(const bt_device_class_t *dc);

// Compares and returns |true| if two device classes |p1| and |p2| are equal.
// False otherwise.
bool device_class_equals(const bt_device_class_t *p1, const bt_device_class_t *p2);
bool device_class_equals(const bt_device_class_t* p1,
                         const bt_device_class_t* p2);

// Copies and returns |true| if the device class was successfully copied from
//  |p2| into |p1|.  False otherwise.
bool device_class_copy(bt_device_class_t* dest, const bt_device_class_t* src);

// Query, getters and setters for the major device class.  |dc| must not be NULL.
// Query, getters and setters for the major device class.  |dc| must not be
// NULL.
int device_class_get_major_device(const bt_device_class_t* dc);
void device_class_set_major_device(bt_device_class_t* dc, int val);

Loading