]> git.kaiwu.me - haproxy.git/commit
CLEANUP: log: Return `size_t` from `sess_build_logline_orig()`
authorTim Duesterhus <tim@bastelstu.be>
Fri, 3 Apr 2026 21:28:57 +0000 (23:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2026 12:02:29 +0000 (14:02 +0200)
commit756ad19f0468cfa404532eca9b4ec61b72f87715
tree963e171d6ca7f101d1efa9146a477d0bfc3a6648
parent34c17608e702a4061d649b63a4ddebf942b50a6c
CLEANUP: log: Return `size_t` from `sess_build_logline_orig()`

`sess_build_logline_orig()` takes a `size_t maxsize` as input and accordingly
should also return `size_t` instead of `int` as the resulting length. In
practice most of the callers already stored the result in a `size_t` anyways.
The few places that used an `int` were adjusted.

This Coccinelle patch was used to check for completeness:

    @@
    type T != size_t;
    T var;
    @@

    (
    * var = build_logline(...)
    |
    * var = build_logline_orig(...)
    |
    * var = sess_build_logline(...)
    |
    * var = sess_build_logline_orig(...)
    )

Reviewed-by: Volker Dusch <github@wallbash.com>
include/haproxy/log.h
src/http_ana.c
src/log.c