summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-11-09 22:41:03 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2010-12-21 20:54:42 +0100
commit9ce233ad4377b609ecb8d3bb84036bb629f7b291 (patch)
tree9cc3b81dd292c4f9ca99949db2be69e24a5924b1
parent87622285c39c00c78113c1338310c0841d646838 (diff)
src: declare non-modified data as const
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r--include/libnetfilter_log/libipulog.h2
-rw-r--r--src/libipulog_compat.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libnetfilter_log/libipulog.h b/include/libnetfilter_log/libipulog.h
index 0278862..8a4ae2a 100644
--- a/include/libnetfilter_log/libipulog.h
+++ b/include/libnetfilter_log/libipulog.h
@@ -45,7 +45,7 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h,
const unsigned char *buf,
size_t len);
-char *ipulog_strerror(int errcode);
+const char *ipulog_strerror(int errcode);
void ipulog_perror(const char *s);
diff --git a/src/libipulog_compat.c b/src/libipulog_compat.c
index fbcf8e5..64ca7f3 100644
--- a/src/libipulog_compat.c
+++ b/src/libipulog_compat.c
@@ -27,10 +27,10 @@ struct ipulog_handle
struct ulog_packet_msg upmsg; /* has to be last in structure */
};
-struct ipulog_errmap_t
+static const struct ipulog_errmap_t
{
int errcode;
- char *message;
+ const char *message;
} ipulog_errmap[] =
{
{ IPULOG_ERR_NONE, "No error" },
@@ -64,7 +64,7 @@ static unsigned int gmask2group(unsigned int gmask)
int ipulog_errno = IPULOG_ERR_NONE;
-char *ipulog_strerror(int errcode)
+const char *ipulog_strerror(int errcode)
{
if (errcode < 0 || errcode > IPULOG_MAXERR)
errcode = IPULOG_ERR_IMPL;