summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Fabro <netfilter@meta-dynamic.com>2010-06-10 14:54:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-06-10 14:54:41 +0200
commit6e204c91b6c7ece751331de2fa3fb460bc5edd59 (patch)
tree5a44f4c4ef7110ec67528aaee469349a8831c6e9 /include
parent6b4e0a01259a80d91d0eaea01281372b594f05b1 (diff)
non-modified payload arguments are pointer-to-const
The payload parameters to nfq_set_verdict(), nfq_set_verdict2(), and nfq_set_verdict_mark() are not modified by those functions, and therefore should have datatype pointer-to-const. This both causes the source-code to more effectively represent what is the purpose of the parameter, and eliminates the need to cast away const-ness when calling the functions with compilers that enforce strict casting. All existing calling code should not need modification as pointer-to-X automatically converts to pointer-to-const-X. Signed-off-by: David Favro <netfilter@meta-dynamic.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/libnetfilter_queue/libnetfilter_queue.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libnetfilter_queue/libnetfilter_queue.h b/include/libnetfilter_queue/libnetfilter_queue.h
index 88a9b8c..2e2ca8b 100644
--- a/include/libnetfilter_queue/libnetfilter_queue.h
+++ b/include/libnetfilter_queue/libnetfilter_queue.h
@@ -60,14 +60,14 @@ extern int nfq_set_verdict(struct nfq_q_handle *qh,
u_int32_t id,
u_int32_t verdict,
u_int32_t data_len,
- unsigned char *buf);
+ const unsigned char *buf);
extern int nfq_set_verdict2(struct nfq_q_handle *qh,
u_int32_t id,
u_int32_t verdict,
u_int32_t mark,
u_int32_t datalen,
- unsigned char *buf);
+ const unsigned char *buf);
extern __attribute__((deprecated))
int nfq_set_verdict_mark(struct nfq_q_handle *qh,
@@ -75,7 +75,7 @@ int nfq_set_verdict_mark(struct nfq_q_handle *qh,
u_int32_t verdict,
u_int32_t mark,
u_int32_t datalen,
- unsigned char *buf);
+ const unsigned char *buf);
/* message parsing function */