Skip to content
Snippets Groups Projects
Commit 91473d5f authored by Sven M. Hallberg's avatar Sven M. Hallberg
Browse files

restore single exit point in parse_xrefs

It turns out that this function was in fact meant to always assign a
result (NULL/0 on failure), accomplished by having a single exit point.
This was changed in 517b81ad for no reason. Reverting.

I'm guessing the goto was considered disagreeable, so I'll explain the
rationale. The function accumulates its result in the *local* variables
xrefs and n. This mainly makes the code nicer to read than writing to
the output directly. Having a single exit point, a property that is easy
to verify, ensures that no update to the local variables can get lost,
i.e. they serve as de-facto aliases for the outputs.
parent f844fce3
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment