diff options
author | JaeMan Park <jaeman@google.com> | 2021-12-08 13:46:40 +0900 |
---|---|---|
committer | JaeMan Park <jaeman@google.com> | 2021-12-08 13:46:40 +0900 |
commit | ed8515f048060bfeac6f53a4e34dc203dfee271c (patch) | |
tree | ac25cc1a7048e5615836a2eefb4b9ab2f0b48e78 /wmediumd | |
parent | ec03db37aad3abb5578a8a63895f3d103b61195b (diff) | |
download | wmediumd-ed8515f048060bfeac6f53a4e34dc203dfee271c.tar.gz |
Rename clear_ctx to clear_config at wmediumd
As discussed at aosp/1903810, the function name clear_ctx is different
with its actual behavior and it can be confused. Change function name
clear_ctx to clear_config.
Bug: 207805951
Test: lunch aosp_cf_x86_64_phone-userdebug && m wmediumd
Change-Id: I4017f5344a8b4014f96358fa1c8d77b0f6083aad
Diffstat (limited to 'wmediumd')
-rw-r--r-- | wmediumd/config.c | 4 | ||||
-rw-r--r-- | wmediumd/config.h | 2 | ||||
-rw-r--r-- | wmediumd/wmediumd.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/wmediumd/config.c b/wmediumd/config.c index 5735f28..fc4986a 100644 --- a/wmediumd/config.c +++ b/wmediumd/config.c @@ -407,7 +407,7 @@ int validate_config(const char* file) { int load_result = load_config(&ctx, file, NULL); - clear_ctx(&ctx); + clear_config(&ctx); if (load_result < 0) return 0; @@ -675,7 +675,7 @@ fail: return -EINVAL; } -int clear_ctx(struct wmediumd *ctx) { +int clear_config(struct wmediumd *ctx) { free(ctx->sta_array); free(ctx->intf); free(ctx->snr_matrix); diff --git a/wmediumd/config.h b/wmediumd/config.h index 63f8615..471ffe1 100644 --- a/wmediumd/config.h +++ b/wmediumd/config.h @@ -24,7 +24,7 @@ #ifndef CONFIG_H_ #define CONFIG_H_ -int clear_ctx(struct wmediumd *ctx); +int clear_config(struct wmediumd *ctx); int validate_config(const char* file); int load_config(struct wmediumd *ctx, const char *file, const char *per_file); int use_fixed_random_value(struct wmediumd *ctx); diff --git a/wmediumd/wmediumd.c b/wmediumd/wmediumd.c index 59ea54e..15535cd 100644 --- a/wmediumd/wmediumd.c +++ b/wmediumd/wmediumd.c @@ -1022,7 +1022,7 @@ static int process_reload_config_message(struct wmediumd *ctx, config_path = reload_config->config_path; if (validate_config(config_path)) { - clear_ctx(ctx); + clear_config(ctx); load_config(ctx, config_path, NULL); } else { result = -1; @@ -1038,7 +1038,7 @@ static int process_reload_current_config_message(struct wmediumd *ctx) { config_path = strdup(ctx->config_path); if (validate_config(config_path)) { - clear_ctx(ctx); + clear_config(ctx); load_config(ctx, config_path, NULL); } else { result = -1; |