Skip to content

Commit 7c62cd3

Browse files
jukkarnashif
authored andcommitted
net: pkt_filter: Reformat macro lines
Shorten long lines with \ chars in NPF_PRIORITY macro so that the output looks good if user is using narrower window to view the code. Reformat \ in NPF_RULE macro so that the code looks better. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
1 parent 2f3e902 commit 7c62cd3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/zephyr/net/net_pkt_filter.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,19 @@ bool npf_remove_all_rules(struct npf_rule_list *rules);
236236
* <tt>NET_OK</tt> or <tt>NET_DROP</tt>.
237237
* @param ... List of conditions for this rule.
238238
*/
239-
#define NPF_RULE(_name, _result, ...) \
240-
struct npf_rule _name = { \
241-
.result = (_result), \
242-
.nb_tests = NUM_VA_ARGS_LESS_1(__VA_ARGS__) + 1, \
239+
#define NPF_RULE(_name, _result, ...) \
240+
struct npf_rule _name = { \
241+
.result = (_result), \
242+
.nb_tests = NUM_VA_ARGS_LESS_1(__VA_ARGS__) + 1, \
243243
.tests = { FOR_EACH(Z_NPF_TEST_ADDR, (,), __VA_ARGS__) }, \
244244
}
245245

246-
#define NPF_PRIORITY(_name, _priority, ...) \
247-
struct npf_rule _name = { \
248-
.result = NET_CONTINUE, \
249-
.priority = (_priority), \
250-
.nb_tests = NUM_VA_ARGS_LESS_1(__VA_ARGS__) + 1, \
251-
.tests = {FOR_EACH(Z_NPF_TEST_ADDR, (,), __VA_ARGS__)}, \
246+
#define NPF_PRIORITY(_name, _priority, ...) \
247+
struct npf_rule _name = { \
248+
.result = NET_CONTINUE, \
249+
.priority = (_priority), \
250+
.nb_tests = NUM_VA_ARGS_LESS_1(__VA_ARGS__) + 1, \
251+
.tests = {FOR_EACH(Z_NPF_TEST_ADDR, (,), __VA_ARGS__)}, \
252252
}
253253

254254
#define Z_NPF_TEST_ADDR(arg) &arg.test

0 commit comments

Comments
 (0)