core: constify bpf program arrays
In cases where the programs were modified after being initially declared, reorder operations so that the declaration is already in final form.
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ static bool can_memlock(void) {
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
struct bpf_insn exit_insn[] = {
|
||||
const struct bpf_insn exit_insn[] = {
|
||||
BPF_MOV64_IMM(BPF_REG_0, 0), /* drop */
|
||||
BPF_EXIT_INSN()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user