Skip to content

Commit

Permalink
cc3200: Initialise variable to zero to prevent compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgeorge committed Jun 20, 2017
1 parent 1686346 commit e678242
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cc3200/mods/modusocket.c
Expand Up @@ -264,7 +264,7 @@ STATIC int wlan_socket_settimeout(mod_network_socket_obj_t *s, mp_uint_t timeout

int ret = sl_SetSockOpt(s->sock_base.sd, SL_SOL_SOCKET, SL_SO_NONBLOCKING, &option, sizeof(option));
if (ret != 0) {
*_errno = ret;
*_errno = convert_sl_errno(ret);
return -1;
}

Expand Down Expand Up @@ -661,9 +661,9 @@ STATIC mp_obj_t socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) {
} else {
timeout = mp_obj_get_int(timeout_in);
}
int _errno;
int _errno = 0;
if (wlan_socket_settimeout(self, timeout, &_errno) != 0) {
mp_raise_OSError(-_errno);
mp_raise_OSError(_errno);
}
return mp_const_none;
}
Expand Down

0 comments on commit e678242

Please sign in to comment.