libnl3. Please make read-only arguments as "const"
Марк Коренберг
socketpair at gmail.com
Thu Jan 26 23:54:22 EST 2012
For example, in nla_parse_nested(), last argument (struct nla_policy
*policy) may be decalred as "const struct nla_policy * policy".
It will allow me to write
static const struct nla_policy my policy {
> ...
> }
and gcc will place this memory in read-only memory segment instead of
writable one. Also, const items are subjects for optimisations in gcc.
--
Segmentation fault
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120127/64a3088b/attachment.html>
More information about the libnl
mailing list