]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: add const to clientwriter tables
authorDan Fandrich <dan@coneharvesters.com>
Thu, 3 Apr 2025 19:42:06 +0000 (12:42 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 3 Apr 2025 19:45:54 +0000 (12:45 -0700)
Unlike the connection filter tables that hold a writable log level, the
client writer tables can be const.

lib/cw-out.c
lib/cw-out.h
lib/cw-pause.c
lib/cw-pause.h

index 6eb7ecd69c6e6964a496272d4741d8f4480ab6c8..af8f1b9e5c1baf544de4c3c0457e0236b32ef1b6 100644 (file)
@@ -114,7 +114,7 @@ static void cw_out_close(struct Curl_easy *data, struct Curl_cwriter *writer);
 static CURLcode cw_out_init(struct Curl_easy *data,
                             struct Curl_cwriter *writer);
 
-struct Curl_cwtype Curl_cwt_out = {
+const struct Curl_cwtype Curl_cwt_out = {
   "cw-out",
   NULL,
   cw_out_init,
index ca4c2e435d2a780861ee529240bb2c015bcc2651..89b9985bb546c49707c5028a4895093322d74a02 100644 (file)
@@ -33,7 +33,7 @@
  * the client callbacks. Intended to be the last installed in the
  * client writer stack of a transfer.
  */
-extern struct Curl_cwtype Curl_cwt_out;
+extern const struct Curl_cwtype Curl_cwt_out;
 
 /**
  * Return TRUE iff 'cw-out' client write has paused data.
index c001b24857c644770dce561c4fea97eec3222a98..9b9554c551570cb63c7a3c3514d381bc94133067 100644 (file)
@@ -87,7 +87,7 @@ static void cw_pause_close(struct Curl_easy *data,
 static CURLcode cw_pause_init(struct Curl_easy *data,
                               struct Curl_cwriter *writer);
 
-struct Curl_cwtype Curl_cwt_pause = {
+const struct Curl_cwtype Curl_cwt_pause = {
   "cw-pause",
   NULL,
   cw_pause_init,
index c2e70b58c3000519bf2137ccfb131eddc54aeeda..2aa1a499cddde9a0732a941f19e5a3f783c9a11c 100644 (file)
@@ -32,7 +32,7 @@
  * The client writer type "cw-pause" that buffers writes for
  * paused transfer writes.
  */
-extern struct Curl_cwtype Curl_cwt_pause;
+extern const struct Curl_cwtype Curl_cwt_pause;
 
 CURLcode Curl_cw_pause_flush(struct Curl_easy *data);