mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 11:08:34 +08:00
format code
This commit is contained in:
parent
4a1a8d1cb4
commit
33a342e8fb
@ -82,7 +82,6 @@ static ret_t date_time_get_now_impl(date_time_t* dt) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
uint64_t stm_now_ms();
|
uint64_t stm_now_ms();
|
||||||
void stm_time_init(void);
|
void stm_time_init(void);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
uint64_t stm_now_ms() {
|
uint64_t stm_now_ms() {
|
||||||
uint64_t now = stm_now();
|
uint64_t now = stm_now();
|
||||||
|
|
||||||
return now/1000000;
|
return now / 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stm_time_init(void) {
|
void stm_time_init(void) {
|
||||||
|
@ -33,8 +33,10 @@ static int32_t tk_istream_tcp_read(tk_istream_t* stream, uint8_t* buff, uint32_t
|
|||||||
|
|
||||||
ret = recv(istream_tcp->sock, buff, max_size, 0);
|
ret = recv(istream_tcp->sock, buff, max_size, 0);
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
if(errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
perror("recv");
|
if (errno != 0) {
|
||||||
|
perror("recv");
|
||||||
|
}
|
||||||
istream_tcp->is_broken = TRUE;
|
istream_tcp->is_broken = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
|
|
||||||
typedef ret_t (*event_source_manager_dispatch_t)(event_source_manager_t* manager);
|
typedef ret_t (*event_source_manager_dispatch_t)(event_source_manager_t* manager);
|
||||||
typedef ret_t (*event_source_manager_destroy_t)(event_source_manager_t* manager);
|
typedef ret_t (*event_source_manager_destroy_t)(event_source_manager_t* manager);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ int32_t tk_istream_read_len(tk_istream_t* stream, uint8_t* buff, uint32_t max_si
|
|||||||
read_bytes = tk_istream_read(stream, buff + offset, remain_bytes);
|
read_bytes = tk_istream_read(stream, buff + offset, remain_bytes);
|
||||||
|
|
||||||
if (read_bytes <= 0) {
|
if (read_bytes <= 0) {
|
||||||
if(errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
sleep_ms(10);
|
sleep_ms(10);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -361,5 +361,4 @@ typedef struct _event_source_t event_source_t;
|
|||||||
struct _event_source_manager_t;
|
struct _event_source_manager_t;
|
||||||
typedef struct _event_source_manager_t event_source_manager_t;
|
typedef struct _event_source_manager_t event_source_manager_t;
|
||||||
|
|
||||||
|
|
||||||
#endif /*TYPES_DEF_H*/
|
#endif /*TYPES_DEF_H*/
|
||||||
|
Loading…
Reference in New Issue
Block a user