apache-mynewt-bot commented on pull request #838:
URL: https://github.com/apache/mynewt-nimble/pull/838#issuecomment-652985161


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### apps/privacy_cent/src/main.c
   <details>
   
   ```diff
   @@ -47,7 +47,7 @@
    static int disconnect(uint16_t conn_handle);
    static int discovery(void);
    
   -static void 
   +static void
    ble_app_set_addr(void)
    {
        int rc;
   @@ -69,7 +69,8 @@
    
    /* Event callback for RPA timecout callout.
       Performs discovery with connection. */
   -static void rpa_exp_timer_cb(struct os_event *ev)
   +static void
   +rpa_exp_timer_cb(struct os_event *ev)
    {
        assert(ev != NULL);
    
   @@ -95,7 +96,7 @@
            } else {
                MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
                    event->connect.status);
   -        } 
   +        }
            break;
        case BLE_GAP_EVENT_DISCONNECT:
            MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   @@ -123,7 +124,7 @@
    scan_event(struct ble_gap_event *event, void *arg)
    {
        /* predef_uuid stores information about UUID of device,
   -    that we connect to */
   +       that we connect to */
        const ble_uuid128_t predef_uuid =
            BLE_UUID128_INIT(0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                             0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff);
   @@ -132,7 +133,7 @@
    
        int rc;
        switch (event->type) {
   -    /* advertising report has been received during discovery procedure */   
   +    /* advertising report has been received during discovery procedure */
        case BLE_GAP_EVENT_DISC:
            memset(&parsed_fields, 0, sizeof(parsed_fields));
    
   @@ -144,14 +145,14 @@
                        event->disc.length_data);
            MODLOG_DFLT(INFO, " advertiser address: %u\n",
                event->disc.addr.val);
   -            peer_addr = event->disc.addr;
   +        peer_addr = event->disc.addr;
            MODLOG_DFLT(INFO, " received signal RSSI: %i\n",
                event->disc.rssi);
            MODLOG_DFLT(INFO, " received data: %u\n",
                &(event->disc.data));
            /* Thi block of code executes if user chose to connect. Predefined
   -          UUID is compared to recieved one; if doesn't fit - end procedure 
and
   -          go back to scanning, else - connect. */
   +           UUID is compared to recieved one; if doesn't fit - end procedure 
and
   +           go back to scanning, else - connect. */
            uuid_cmp_result = ble_uuid_cmp(&predef_uuid.u, 
&parsed_fields.uuids128->u);
    
            if (uuid_cmp_result) {
   @@ -225,7 +226,7 @@
        return 0;
    }
    
   -static void 
   +static void
    on_sync(void)
    {
        int rc;
   @@ -249,7 +250,8 @@
        MODLOG_DFLT(INFO, "Resetting state; reason=%d\n", reason);
    }
    
   -int main(void)
   +int
   +main(void)
    {
        /* Initialize all packages. */
        sysinit();
   ```
   
   </details>
   
   #### apps/privacy_periph/src/main.c
   <details>
   
   ```diff
   @@ -45,7 +45,7 @@
    
    static int advertise();
    
   -static void 
   +static void
    ble_app_set_addr(void)
    {
        int rc;
   @@ -83,7 +83,7 @@
            break;
        case BLE_GAP_EVENT_CONN_UPDATE_REQ:
            /* connected device requests update of connection parameters,
   -        and these are being filled in - NULL sets default values */
   +           and these are being filled in - NULL sets default values */
            MODLOG_DFLT(INFO, "updating conncetion parameters...\n");
            event->conn_update_req.conn_handle = conn_handle;
            event->conn_update_req.peer_params = NULL;
   @@ -110,7 +110,7 @@
        default:
            MODLOG_DFLT(ERROR, "Advertising event not handled, "
                        "event code: %u\n", event->type);
   -    break;
   +        break;
        }
        return 0;
    }
   @@ -121,7 +121,7 @@
        int rc;
    
        adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
   -    adv_params.disc_mode =  BLE_GAP_DISC_MODE_GEN;
   +    adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
    
        fields.flags = BLE_HS_ADV_F_DISC_GEN |
                       BLE_HS_ADV_F_BREDR_UNSUP;
   @@ -136,7 +136,7 @@
        rsp_fields.name = (uint8_t *)device_name;
        rsp_fields.name_len = strlen(device_name);
        rsp_fields.name_is_complete = 1;
   -    
   +
        rc = ble_gap_adv_set_fields(&fields);
        assert(rc == 0);
    
   @@ -162,7 +162,7 @@
        return 0;
    }
    
   -static void 
   +static void
    on_sync(void)
    {
        int rc;
   @@ -186,7 +186,8 @@
        MODLOG_DFLT(INFO, "Resetting state; reason=%d\n", reason);
    }
    
   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
    {
        /* Initialize all packages. */
        sysinit();
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to