Skip to content

Commit 2d93909

Browse files
jeplerdpgeorge
authored andcommitted
extmod/modlwip: Print timeout with correct format string.
As timeout is of type `mp_uint_t`, it must be printed with UINT_FMT. Before, the compiler plugin produced an error in the PYBD_SF6 build, which is a nanboxing build with 64-bit ints. Signed-off-by: Jeff Epler <[email protected]>
1 parent 18a835e commit 2d93909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extmod/modlwip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ static const mp_obj_type_t lwip_socket_type;
907907

908908
static void lwip_socket_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
909909
lwip_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
910-
mp_printf(print, "<socket state=%d timeout=%d incoming=", self->state, self->timeout);
910+
mp_printf(print, "<socket state=%d timeout=" UINT_FMT " incoming=", self->state, self->timeout);
911911
if (self->type == MOD_NETWORK_SOCK_STREAM) {
912912
mp_printf(print, "%p off=%d>", self->incoming.tcp.pbuf, self->recv_offset);
913913
} else {

0 commit comments

Comments
 (0)