format code

This commit is contained in:
lixianjing 2021-07-07 09:40:04 +08:00
parent fa7789947c
commit 90b418624d
4 changed files with 10 additions and 8 deletions

View File

@ -326,7 +326,7 @@ ret_t lcd_resize(lcd_t* lcd, wh_t w, wh_t h, uint32_t line_length) {
if (lcd->resize(lcd, w, h, line_length) == RET_OK) {
lcd->w = w;
lcd->h = h;
return RET_OK;
return RET_OK;
}
}

View File

@ -727,7 +727,8 @@ uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget) {
return wm->curr_expected_sleep_time;
}
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, uint32_t curr_expected_sleep_time) {
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget,
uint32_t curr_expected_sleep_time) {
window_manager_t* wm = WINDOW_MANAGER(widget);
return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS);
wm->curr_expected_sleep_time = curr_expected_sleep_time;

View File

@ -493,7 +493,8 @@ ret_t window_manager_on_theme_changed(widget_t* widget);
ret_t window_manager_dispatch_top_window_changed(widget_t* widget);
ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type);
uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget);
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, uint32_t curr_expected_sleep_time);
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget,
uint32_t curr_expected_sleep_time);
#define WINDOW_MANAGER(widget) ((window_manager_t*)(widget))

View File

@ -238,7 +238,7 @@ ret_t tk_semaphore_wait(tk_semaphore_t* semaphore, uint32_t timeout_ms) {
if (timeout_ms == -1) {
int retval;
do {
retval = sem_wait(semaphore->sem);
retval = sem_wait(semaphore->sem);
} while (retval < 0 && errno == EINTR);
return_value_if_fail(retval == 0, RET_FAIL);
@ -265,10 +265,10 @@ tryagain:
return RET_OK;
} else {
switch (errno) {
case EINTR:
goto tryagain;
case ETIMEDOUT:
return RET_TIMEOUT;
case EINTR:
goto tryagain;
case ETIMEDOUT:
return RET_TIMEOUT;
}
return RET_FAIL;
}