CLEANUP: sample: Improve local variables in sample_conv_json_query
authorTim Duesterhus <tim@bastelstu.be>
Thu, 15 Apr 2021 16:08:48 +0000 (18:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Apr 2021 18:33:31 +0000 (20:33 +0200)
commit4809c8c9558aca07edd587bf0b1bf287ddfbfc98
tree416f52cdc9d4714a008e0fff99311d63673db30d
parent7d9acced279455c0caa7fb637246efe5bd807569
CLEANUP: sample: Improve local variables in sample_conv_json_query

This improves the use of local variables in sample_conv_json_query:

- Use the enum type for the return value of `mjson_find`.
- Do not use single letter variables.
- Reduce the scope of variables that are only needed in a single branch.
- Add missing newlines after variable declaration.
src/sample.c