diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-06-16 14:26:13 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-06-16 14:26:13 +0000 |
| commit | d88bea5e22330c36c241ae0d441279799ac5897f (patch) | |
| tree | e80f000fe6f6b409311bb05d1d540b7db3b2ed4a /foot-server@.socket | |
| parent | test: config: add test for url.protocols option (diff) | |
vt: split up action_param() to three separate functions
We’re already switching on the next VT input byte in the state
machine; no need to if...else if in action_param() too.
That is, split up action_param() into three:
* action_param_new()
* action_param_new_subparam()
* action_param()
This makes the code cleaner, and hopefully slightly faster.
Next, to improve performance further, only check for (sub)parameter
overflow in action_param_new() and action_param_subparam().
Add pointers to the VT struct that points to the currently active
parameter and sub-parameter.
When the number of parameters (or sub-parameters) overflow, warn, and
then point the parameter pointer to a "dummy" value in the VT struct.
This way, we don’t have to check anything in action_param().
Diffstat (limited to 'foot-server@.socket')
0 files changed, 0 insertions, 0 deletions
