]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
msh3: change the static_assert to make the code C89
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Sep 2022 08:36:41 +0000 (10:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Sep 2022 06:27:50 +0000 (08:27 +0200)
lib/vquic/msh3.c

index dffa8a0733270d9b046a95440d0b0feb9a8fbe2b..c3e58e726a455652a1fe4dda62bb24099c473dba 100644 (file)
@@ -381,9 +381,6 @@ static void MSH3_CALL msh3_shutdown(MSH3_REQUEST *Request, void *IfContext)
   (void)stream;
 }
 
-static_assert(sizeof(MSH3_HEADER) == sizeof(struct h2h3pseudo),
-              "Sizes must match for cast below to work");
-
 static ssize_t msh3_stream_send(struct Curl_easy *data,
                                 int sockindex,
                                 const void *mem,
@@ -396,6 +393,9 @@ static ssize_t msh3_stream_send(struct Curl_easy *data,
   struct h2h3req *hreq;
 
   (void)sockindex;
+  /* Sizes must match for cast below to work" */
+  DEBUGASSERT(sizeof(MSH3_HEADER) == sizeof(struct h2h3pseudo));
+
   H3BUGF(infof(data, "msh3_stream_send %zu", len));
 
   if(!stream->req) {