]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: list: fix again some style issues in the recent comments
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Sep 2022 05:42:28 +0000 (07:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Sep 2022 06:04:08 +0000 (08:04 +0200)
commit56ac2cbf5893c83cabc96217c5652839b1524087
treeebf189a945e66cbf2194494c5dd13e3d47425936
parent70c5ad4425519296e344c3eed7181176a10ad921
CLEANUP: list: fix again some style issues in the recent comments

While reading the recent changes around mt_list_for_each_entry_safe() I
noticed a spurious "q" at the beginning of a line introduced by commit
455843721 ("CLEANUP: list: Fix mt_list_for_each_entry_safe indentation")
and that visually confusing multi-line comments missing the trailing '\'
character were introduced by previous commit 60cffbaca ("MINOR: list:
documenting mt_list_for_each_entry_safe() macro"), which at first glance
made the macro look broken. In addition, multi-line comments must end
with a "*/" on its own line to instantly spot where it ends without
having to read the whole line, like this:

    /* we know from the above that foo is always valid
     * here so it's safe to end the string:
     */
    *(unsigned char *)foo = 0;

Not like this:

    /* we know from the above that foo is always valid
     * here so it's safe to end the string: */
    *(unsigned char *)foo = 0;

Finally, macro's main comment mentionned the wrong macro name and types,
and was randomly indented.
include/haproxy/list.h