If you put this snippet into a `static inline` function above, you could use `return next_display_state(want_state, next_state);` instead of all the `goto UPDATE;` above, where `get_date` is:

```
static inline gpointer next_display_state(int want_state, int next_state)
{
    if (want_state != next_state) {
        mce_log(LL_WARN, "requested: %s, granted: %s",
                mdy_display_state_name(want_state),
                mdy_display_state_name(next_state));
    }
    return GINT_TO_POINTER(next_state);
}
```