all: Reformat C and Python source code with tools/codeformat.py.
This is run with uncrustify 0.70.1, and black 19.10b0.
This commit is contained in:
@@ -155,7 +155,7 @@ STATIC void handle_op(mp_obj_webrepl_t *self) {
|
||||
open_args[1] = MP_OBJ_NEW_QSTR(MP_QSTR_wb);
|
||||
}
|
||||
|
||||
self->cur_file = mp_builtin_open(2, open_args, (mp_map_t*)&mp_const_empty_map);
|
||||
self->cur_file = mp_builtin_open(2, open_args, (mp_map_t *)&mp_const_empty_map);
|
||||
|
||||
#if 0
|
||||
struct mp_stream_seek_t seek = { .offset = self->hdr.offset, .whence = 0 };
|
||||
@@ -196,7 +196,7 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
|
||||
}
|
||||
|
||||
if (self->state == STATE_PASSWD) {
|
||||
char c = *(char*)buf;
|
||||
char c = *(char *)buf;
|
||||
if (c == '\r' || c == '\n') {
|
||||
self->hdr.fname[self->data_to_recv] = 0;
|
||||
DEBUG_printf("webrepl: entered password: %s\n", self->hdr.fname);
|
||||
@@ -224,8 +224,8 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
|
||||
DEBUG_printf("webrepl: received bin data, hdr_to_recv: %d, data_to_recv=%d\n", self->hdr_to_recv, self->data_to_recv);
|
||||
|
||||
if (self->hdr_to_recv != 0) {
|
||||
char *p = (char*)&self->hdr + sizeof(self->hdr) - self->hdr_to_recv;
|
||||
*p++ = *(char*)buf;
|
||||
char *p = (char *)&self->hdr + sizeof(self->hdr) - self->hdr_to_recv;
|
||||
*p++ = *(char *)buf;
|
||||
if (--self->hdr_to_recv != 0) {
|
||||
mp_uint_t hdr_sz = sock_stream->read(self->sock, p, self->hdr_to_recv, errcode);
|
||||
if (hdr_sz == MP_STREAM_ERROR) {
|
||||
@@ -250,7 +250,7 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
|
||||
static
|
||||
#endif
|
||||
byte filebuf[512];
|
||||
filebuf[0] = *(byte*)buf;
|
||||
filebuf[0] = *(byte *)buf;
|
||||
mp_uint_t buf_sz = 1;
|
||||
if (--self->data_to_recv != 0) {
|
||||
size_t to_read = MIN(sizeof(filebuf) - 1, self->data_to_recv);
|
||||
@@ -348,7 +348,7 @@ STATIC const mp_obj_type_t webrepl_type = {
|
||||
.name = MP_QSTR__webrepl,
|
||||
.make_new = webrepl_make_new,
|
||||
.protocol = &webrepl_stream_p,
|
||||
.locals_dict = (mp_obj_dict_t*)&webrepl_locals_dict,
|
||||
.locals_dict = (mp_obj_dict_t *)&webrepl_locals_dict,
|
||||
};
|
||||
|
||||
STATIC const mp_rom_map_elem_t webrepl_module_globals_table[] = {
|
||||
@@ -361,7 +361,7 @@ STATIC MP_DEFINE_CONST_DICT(webrepl_module_globals, webrepl_module_globals_table
|
||||
|
||||
const mp_obj_module_t mp_module_webrepl = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t*)&webrepl_module_globals,
|
||||
.globals = (mp_obj_dict_t *)&webrepl_module_globals,
|
||||
};
|
||||
|
||||
#endif // MICROPY_PY_WEBREPL
|
||||
|
||||
Reference in New Issue
Block a user