#3899: mutt_ssl's interactive_check_cert() has several issues
-----------------------+----------------------
Reporter: kevin8t8 | Owner: mutt-dev
Type: defect | Status: closed
Priority: major | Milestone:
Component: crypto | Version:
Resolution: fixed | Keywords:
-----------------------+----------------------
Comment (by derekmartin):
Personally, I can't even parse that (particularly the
BUILD_BUG_UNLESS_ZERO macro). It nests macro upon macro, and if used for
this problem it does a bunch of math in a loop... all to copy a fixed
number of fields into a buffer, essentially. The word that comes to mind
is "gross." I can't imagine how this is a better option than the helper
function (which you could inline), which is simpler, clearer, and more
efficient, avoiding the indirection of the macros, the array, and the
looping entirely. With optimizations enabled it probably makes very
little difference (and certainly wouldn't be noticeable to the user in any
event) but it's still way, way easier to understand.
--
Ticket URL: <https://dev.mutt.org/trac/ticket/3899#comment:23>
Mutt <http://www.mutt.org/>
The Mutt mail user agent