aboutsummaryrefslogtreecommitdiff
path: root/lib/roles/h1
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2020-01-15 06:31:19 +0000
committerAndy Green <andy@warmcat.com>2020-01-15 06:31:19 +0000
commit6f2230a99312cc4bdf409775fbc1c5fd818a83b4 (patch)
treef06d5115d97eb3aa2fc05b721f470dbcd5522fe4 /lib/roles/h1
parent5055096e47e5a6d926d11372cfc7947aa737e03a (diff)
downloadlibwebsockets-6f2230a99312cc4bdf409775fbc1c5fd818a83b4.tar.gz
role structs to const
Indicate these are immutable (they're already treated as such) and can go in .rodata
Diffstat (limited to 'lib/roles/h1')
-rw-r--r--lib/roles/h1/ops-h1.c2
-rw-r--r--lib/roles/h1/private-lib-roles-h1.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/roles/h1/ops-h1.c b/lib/roles/h1/ops-h1.c
index 0287eed8..3eac468c 100644
--- a/lib/roles/h1/ops-h1.c
+++ b/lib/roles/h1/ops-h1.c
@@ -1131,7 +1131,7 @@ rops_pt_init_destroy_h1(struct lws_context *context,
return 0;
}
-struct lws_role_ops role_ops_h1 = {
+const struct lws_role_ops role_ops_h1 = {
/* role name */ "h1",
/* alpn id */ "http/1.1",
/* check_upgrades */ NULL,
diff --git a/lib/roles/h1/private-lib-roles-h1.h b/lib/roles/h1/private-lib-roles-h1.h
index 7b1ebbff..f58ce7e8 100644
--- a/lib/roles/h1/private-lib-roles-h1.h
+++ b/lib/roles/h1/private-lib-roles-h1.h
@@ -26,5 +26,5 @@
* Most of the h1 business is defined in the h1 / h2 common roles/http dir
*/
-extern struct lws_role_ops role_ops_h1;
+extern const struct lws_role_ops role_ops_h1;
#define lwsi_role_h1(wsi) (wsi->role_ops == &role_ops_h1)