]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: fcgi: Use `istadv()` in `fcgi_strm_send_params`
authorTim Duesterhus <tim@bastelstu.be>
Fri, 4 Mar 2022 23:52:45 +0000 (00:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Mar 2022 06:51:27 +0000 (07:51 +0100)
commita6a327918842577a5e49d89afb79a2d4509fa38d
tree6e95a8e10d3b8380e9cd4c870fdc2c35d6188bc3
parent98f05f6a38c35d52081d72a31a9c3cd9140e28d8
CLEANUP: fcgi: Use `istadv()` in `fcgi_strm_send_params`

Found manually, while creating the previous commits to turn `struct proxy`
members into ists.

There is an existing Coccinelle rule to replace this pattern by `istadv()` in
`ist.cocci`:

    @@
    struct ist i;
    expression e;
    @@

    - i.ptr += e;
    - i.len -= e;
    + i = istadv(i, e);

But apparently it is not smart enough to match ists that are stored in another
struct. It would be useful to make the existing rule more generic, so that it
might catch similar cases in the future.
src/mux_fcgi.c