We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2130428 commit 7b2ca71Copy full SHA for 7b2ca71
1 file changed
examples/safety_demo.ks
@@ -117,17 +117,17 @@ fn array_validation_demo(ctx: *xdp_md) -> xdp_action {
117
var result: xdp_action = XDP_PASS
118
119
// Call safe functions
120
- var _ = safe_function(ctx)
121
- var _ = bounds_demo(ctx)
122
- var _ = moderate_stack_usage(ctx)
+ safe_function(ctx)
+ bounds_demo(ctx)
+ moderate_stack_usage(ctx)
123
124
// The following call would trigger warnings:
125
// let _ = large_stack_usage(ctx) // Stack overflow warning
126
127
// Safe map access
128
var key: u32 = 1
129
var count = packet_stats[key]
130
- if (count != null) {
+ if (count != none) {
131
packet_stats[key] = count + 1
132
} else {
133
packet_stats[key] = 1
0 commit comments