[PATCH 06/11] Sptr: avoided potentially undefined behaviour.

Andrew Clayton andrew at digital-domain.net
Sat Jun 18 14:18:41 UTC 2022


On Sat, 18 Jun 2022 16:07:51 +0200
Alejandro Colomar <alx.manpages at gmail.com> wrote:

> I strongly prefer not having comments about how code works.
> They tend to be obsolete, and maintaining comments is harder than the code.

There is certainly a fine line about when and what to comment.
 
> Better improve the code, adding these details to the commit log, where 
> the comment is tied to the point in time where it was true, forever.

In this case the code is so baroque that it really deserves a comment
or you'll get people trying to fix it when it ain't broke ;)

Either that or as you suggest, re-work the code to make it more obvious
about what's going on.

Now which patch (adding a comment or changing the code) has more chance
of being accepted?!

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20220618/0e26accf/attachment.bin>


More information about the unit mailing list