sleep-config: several cleanups

* Rename free_sleep_config to sleep_config_free
* Rearrange functions
* Make SleepConfig.modes and .states only contain
  operations that needs configuration
* Add missing assert
This commit is contained in:
Mike Yuan
2023-09-27 21:48:39 +08:00
parent f3afe9dc20
commit 087a25d2ca
4 changed files with 43 additions and 36 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
#include "tests.h"
TEST(parse_sleep_config) {
_cleanup_(free_sleep_configp) SleepConfig *sleep_config = NULL;
_cleanup_(sleep_config_freep) SleepConfig *sleep_config = NULL;
assert_se(parse_sleep_config(&sleep_config) == 0);