Skip to content

Commit 13f43dc

Browse files
committed
format: Fix formatting errors in previous commits.
Signed-off-by: Duncan Lowther <[email protected]>
1 parent 94bc54f commit 13f43dc

29 files changed

+473
-443
lines changed

extmod/modtls_mbedtls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ typedef struct _mp_obj_ssl_socket_t {
7777
mp_obj_t sock;
7878
mbedtls_ssl_context ssl;
7979

80-
#ifdef __CHERI_PURE_CAPABILITY__
80+
#ifdef __CHERI_PURE_CAPABILITY__
8181
uint64_t poll_mask;
82-
#else
82+
#else
8383
uintptr_t poll_mask; // Indicates which read or write operations the protocol needs next
84-
#endif
84+
#endif
8585
int last_error; // The last error code, if any
8686
} mp_obj_ssl_socket_t;
8787

extmod/moductypes.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ static NORETURN void syntax_error(void) {
9696
static mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
9797
mp_arg_check_num(n_args, n_kw, 2, 3, false);
9898
mp_obj_uctypes_struct_t *o = mp_obj_malloc(mp_obj_uctypes_struct_t, type);
99-
#ifdef __CHERI_PURE_CAPABILITY__
99+
#ifdef __CHERI_PURE_CAPABILITY__
100100
o->addr = (void *)mp_obj_cap_get(args[0]);
101-
#else
101+
#else
102102
o->addr = (void *)(uintptr_t)mp_obj_int_get_truncated(args[0]);
103-
#endif
103+
#endif
104104
o->desc = args[1];
105105
o->flags = LAYOUT_NATIVE;
106106
if (n_args == 3) {
@@ -620,33 +620,33 @@ static mp_int_t uctypes_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo,
620620
static mp_obj_t uctypes_struct_addressof(mp_obj_t buf) {
621621
mp_buffer_info_t bufinfo;
622622
mp_get_buffer_raise(buf, &bufinfo, MP_BUFFER_READ);
623-
#ifdef __CHERI_PURE_CAPABILITY__
623+
#ifdef __CHERI_PURE_CAPABILITY__
624624
return mp_obj_new_cap(bufinfo.buf);
625-
#else
625+
#else
626626
return mp_obj_new_int((mp_int_t)(uintptr_t)bufinfo.buf);
627-
#endif
627+
#endif
628628
}
629629
MP_DEFINE_CONST_FUN_OBJ_1(uctypes_struct_addressof_obj, uctypes_struct_addressof);
630630

631631
// bytearray_at()
632632
// Capture memory at given address of given size as bytearray.
633633
static mp_obj_t uctypes_struct_bytearray_at(mp_obj_t ptr, mp_obj_t size) {
634-
#ifdef __CHERI_PURE_CAPABILITY__
634+
#ifdef __CHERI_PURE_CAPABILITY__
635635
return mp_obj_new_bytearray_by_ref(mp_obj_int_get_truncated(size), (void *)mp_obj_cap_get(ptr));
636-
#else
636+
#else
637637
return mp_obj_new_bytearray_by_ref(mp_obj_int_get_truncated(size), (void *)(uintptr_t)mp_obj_int_get_truncated(ptr));
638-
#endif
638+
#endif
639639
}
640640
MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytearray_at);
641641

642642
// bytes_at()
643643
// Capture memory at given address of given size as bytes.
644644
static mp_obj_t uctypes_struct_bytes_at(mp_obj_t ptr, mp_obj_t size) {
645-
#ifdef __CHERI_PURE_CAPABILITY__
646-
return mp_obj_new_bytes((void*)mp_obj_cap_get(ptr), mp_obj_int_get_truncated(size));
647-
#else
645+
#ifdef __CHERI_PURE_CAPABILITY__
646+
return mp_obj_new_bytes((void *)mp_obj_cap_get(ptr), mp_obj_int_get_truncated(size));
647+
#else
648648
return mp_obj_new_bytes((void *)(uintptr_t)mp_obj_int_get_truncated(ptr), mp_obj_int_get_truncated(size));
649-
#endif
649+
#endif
650650
}
651651
MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytes_at_obj, uctypes_struct_bytes_at);
652652

ports/cheriot-rtos/cheriintrin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@
1414
#define cheri_unseal(a, b) cunseal((a), (b))
1515
#define cheri_bounds_set(a, b) csetbounds((a), (b))
1616
#define cheri_bounds_set_exact(a, b) csetboundsext((a), (b))
17-

ports/cheriot-rtos/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <string.h>
44
#include <compartment.h>
55

6-
#include "mp_entry.h"
6+
#include "mp_entry.hh"
77
#include "mphalport.h"
88

99
void __cheri_compartment("main") entry(void) {

0 commit comments

Comments
 (0)