Print this page
const-ify make segment ops structures
There is no reason to keep the segment ops structures writable.
@@ -97,11 +97,11 @@
size_t softlockcnt;
domid_t domid;
segmf_map_t *map;
};
-static struct seg_ops segmf_ops;
+static const struct seg_ops segmf_ops;
static int segmf_fault_gref_range(struct seg *seg, caddr_t addr, size_t len);
static struct segmf_data *
segmf_data_zalloc(struct seg *seg)
@@ -734,11 +734,11 @@
}
return (0);
}
-static struct seg_ops segmf_ops = {
+static const struct seg_ops segmf_ops = {
.dup = segmf_dup,
.unmap = segmf_unmap,
.free = segmf_free,
.fault = segmf_fault,
.faulta = segmf_faulta,