Skip to content

Commit

Permalink
all: Don't include system errno.h when it's not needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgeorge committed Jul 24, 2017
1 parent a559098 commit aa7be82
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion cc3200/mods/pybuart.c
Expand Up @@ -27,7 +27,6 @@

#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>

#include "py/mpconfig.h"
Expand Down
2 changes: 1 addition & 1 deletion extmod/modbtree.c
Expand Up @@ -26,7 +26,7 @@

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <errno.h> // for declaration of global errno variable
#include <fcntl.h>

#include "py/nlr.h"
Expand Down
1 change: 0 additions & 1 deletion extmod/modussl_axtls.c
Expand Up @@ -26,7 +26,6 @@

#include <stdio.h>
#include <string.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/runtime.h"
Expand Down
1 change: 0 additions & 1 deletion extmod/modussl_mbedtls.c
Expand Up @@ -29,7 +29,6 @@

#include <stdio.h>
#include <string.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/runtime.h"
Expand Down
1 change: 0 additions & 1 deletion extmod/modwebrepl.c
Expand Up @@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/obj.h"
Expand Down
5 changes: 2 additions & 3 deletions extmod/modwebsocket.c
Expand Up @@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/obj.h"
Expand Down Expand Up @@ -88,7 +87,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
self->buf_pos += out_sz;
self->to_recv -= out_sz;
if (self->to_recv != 0) {
*errcode = EAGAIN;
*errcode = MP_EAGAIN;
return MP_STREAM_ERROR;
}
}
Expand Down Expand Up @@ -267,7 +266,7 @@ STATIC mp_uint_t websocket_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t
return cur;
}
default:
*errcode = EINVAL;
*errcode = MP_EINVAL;
return MP_STREAM_ERROR;
}
}
Expand Down
1 change: 0 additions & 1 deletion extmod/uos_dupterm.c
Expand Up @@ -24,7 +24,6 @@
* THE SOFTWARE.
*/

#include <errno.h>
#include <string.h>
#include "py/mpconfig.h"

Expand Down
1 change: 0 additions & 1 deletion extmod/vfs_fat_file.c
Expand Up @@ -28,7 +28,6 @@
#if MICROPY_VFS && MICROPY_VFS_FAT

#include <stdio.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/runtime.h"
Expand Down
1 change: 0 additions & 1 deletion mpy-cross/main.c
Expand Up @@ -28,7 +28,6 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

#include "py/mpstate.h"
#include "py/compile.h"
Expand Down
1 change: 0 additions & 1 deletion py/reader.c
Expand Up @@ -71,7 +71,6 @@ void mp_reader_new_mem(mp_reader_t *reader, const byte *buf, size_t len, size_t
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

typedef struct _mp_reader_posix_t {
bool close_fd;
Expand Down

0 comments on commit aa7be82

Please sign in to comment.