Skip to content

Commit aa7be82

Browse files
committed
all: Don't include system errno.h when it's not needed.
1 parent a559098 commit aa7be82

File tree

10 files changed

+3
-12
lines changed

10 files changed

+3
-12
lines changed

cc3200/mods/pybuart.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include <stdint.h>
2929
#include <stdio.h>
30-
#include <errno.h>
3130
#include <string.h>
3231

3332
#include "py/mpconfig.h"

extmod/modbtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <stdio.h>
2828
#include <string.h>
29-
#include <errno.h>
29+
#include <errno.h> // for declaration of global errno variable
3030
#include <fcntl.h>
3131

3232
#include "py/nlr.h"

extmod/modussl_axtls.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include <stdio.h>
2828
#include <string.h>
29-
#include <errno.h>
3029

3130
#include "py/nlr.h"
3231
#include "py/runtime.h"

extmod/modussl_mbedtls.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
#include <stdio.h>
3131
#include <string.h>
32-
#include <errno.h>
3332

3433
#include "py/nlr.h"
3534
#include "py/runtime.h"

extmod/modwebrepl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <stdio.h>
2828
#include <stdint.h>
2929
#include <string.h>
30-
#include <errno.h>
3130

3231
#include "py/nlr.h"
3332
#include "py/obj.h"

extmod/modwebsocket.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <stdio.h>
2828
#include <stdint.h>
2929
#include <string.h>
30-
#include <errno.h>
3130

3231
#include "py/nlr.h"
3332
#include "py/obj.h"
@@ -88,7 +87,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
8887
self->buf_pos += out_sz;
8988
self->to_recv -= out_sz;
9089
if (self->to_recv != 0) {
91-
*errcode = EAGAIN;
90+
*errcode = MP_EAGAIN;
9291
return MP_STREAM_ERROR;
9392
}
9493
}
@@ -267,7 +266,7 @@ STATIC mp_uint_t websocket_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t
267266
return cur;
268267
}
269268
default:
270-
*errcode = EINVAL;
269+
*errcode = MP_EINVAL;
271270
return MP_STREAM_ERROR;
272271
}
273272
}

extmod/uos_dupterm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include <errno.h>
2827
#include <string.h>
2928
#include "py/mpconfig.h"
3029

extmod/vfs_fat_file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#if MICROPY_VFS && MICROPY_VFS_FAT
2929

3030
#include <stdio.h>
31-
#include <errno.h>
3231

3332
#include "py/nlr.h"
3433
#include "py/runtime.h"

mpy-cross/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <string.h>
2929
#include <stdlib.h>
3030
#include <unistd.h>
31-
#include <errno.h>
3231

3332
#include "py/mpstate.h"
3433
#include "py/compile.h"

py/reader.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ void mp_reader_new_mem(mp_reader_t *reader, const byte *buf, size_t len, size_t
7171
#include <sys/stat.h>
7272
#include <fcntl.h>
7373
#include <unistd.h>
74-
#include <errno.h>
7574

7675
typedef struct _mp_reader_posix_t {
7776
bool close_fd;

0 commit comments

Comments
 (0)