From a69b298aed6c2b711ab5a9e32102fa4df986406d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 17 Sep 2020 11:42:33 -0500 Subject: [PATCH] Whitespace --- shared-bindings/_canio/CAN.c | 2 +- shared-bindings/_canio/Listener.c | 2 +- shared-bindings/_canio/Match.c | 4 ++-- shared-bindings/_canio/Message.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/shared-bindings/_canio/CAN.c b/shared-bindings/_canio/CAN.c index 8f3e45420d..53045c35ad 100644 --- a/shared-bindings/_canio/CAN.c +++ b/shared-bindings/_canio/CAN.c @@ -298,7 +298,7 @@ STATIC mp_obj_t canio_can_listen(size_t n_args, const mp_obj_t *pos_args, mp_map canio_match_obj_t *matches[nmatch]; for (size_t i=0; iname); } matches[i] = MP_OBJ_TO_PTR(match_objects[i]); diff --git a/shared-bindings/_canio/Listener.c b/shared-bindings/_canio/Listener.c index d68138d997..a3890f8dd3 100644 --- a/shared-bindings/_canio/Listener.c +++ b/shared-bindings/_canio/Listener.c @@ -112,7 +112,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_iter_obj, canio_listener_iter); STATIC mp_obj_t canio_listener_next(mp_obj_t self_in) { canio_listener_obj_t *self = MP_OBJ_TO_PTR(self_in); common_hal_canio_listener_check_for_deinit(self); - if(common_hal_canio_listener_in_waiting(self)) { + if (common_hal_canio_listener_in_waiting(self)) { return canio_listener_read(self_in); } return self; diff --git a/shared-bindings/_canio/Match.c b/shared-bindings/_canio/Match.c index 6c32aa5390..b71529b736 100644 --- a/shared-bindings/_canio/Match.c +++ b/shared-bindings/_canio/Match.c @@ -59,11 +59,11 @@ STATIC mp_obj_t canio_match_make_new(const mp_obj_type_t *type, size_t n_args, c int address = args[ARG_address].u_int; int mask = args[ARG_mask].u_int; - if(address & ~address_bits) { + if (address & ~address_bits) { mp_raise_ValueError_varg(translate("%q out of range"), MP_QSTR_address); } - if(mask & ~address_bits) { + if (mask & ~address_bits) { mp_raise_ValueError_varg(translate("%q out of range"), MP_QSTR_mask); } diff --git a/shared-bindings/_canio/Message.c b/shared-bindings/_canio/Message.c index 3fa018a834..bfaaf52b2f 100644 --- a/shared-bindings/_canio/Message.c +++ b/shared-bindings/_canio/Message.c @@ -67,7 +67,7 @@ STATIC mp_obj_t canio_message_make_new(const mp_obj_type_t *type, size_t n_args, bool specified_size = (size != (size_t)-1); bool specified_data = (args[ARG_data].u_obj != NULL); - if(specified_size && specified_data) { + if (specified_size && specified_data) { mp_raise_TypeError(translate("specify size or data, but not both")); } @@ -82,7 +82,7 @@ STATIC mp_obj_t canio_message_make_new(const mp_obj_type_t *type, size_t n_args, data.len = 0; } - if(data.len > 8) { + if (data.len > 8) { mp_raise_ValueError(translate("Messages limited to 8 bytes")); } @@ -130,7 +130,7 @@ STATIC mp_obj_t canio_message_data_set(const mp_obj_t self_in, const mp_obj_t da canio_message_obj_t *self = self_in; mp_buffer_info_t data; mp_get_buffer_raise(data_in, &data, MP_BUFFER_READ); - if(data.len > 8) { + if (data.len > 8) { mp_raise_ValueError(translate("Messages limited to 8 bytes")); } common_hal_canio_message_data_set(self, data.buf, data.len); @@ -161,7 +161,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(canio_message_size_get_obj, canio_message_size_get); STATIC mp_obj_t canio_message_size_set(const mp_obj_t self_in, const mp_obj_t size_in) { canio_message_obj_t *self = self_in; int size = mp_obj_get_int(size_in); - if(size > 8) { + if (size > 8) { mp_raise_ValueError(translate("Messages limited to 8 bytes")); } common_hal_canio_message_size_set(self, size);