summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-18 02:35:16 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-18 12:38:32 +0200
commitca4e095ab9e970cb8fa472ae69ea1f0648041722 (patch)
treef52866c74ae50f3b996f164efaaa690513c96034 /src/libsystemd/sd-rtnl/rtnl-message.c
parent0204152684188302e6c6232e50f30997fecb4ae3 (diff)
sd-rtnl: make string returned by sd_rtnl_message_read_string() const
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 4d1b6fb198..c0a38e148b 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -786,7 +786,7 @@ int rtnl_message_read_internal(sd_rtnl_message *m, unsigned short type, void **d
return RTA_PAYLOAD(rta);
}
-int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **data) {
+int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, const char **data) {
int r;
void *attr_data;
@@ -800,7 +800,7 @@ int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **
else if (strnlen(attr_data, r) >= (size_t) r)
return -EIO;
- *data = (char *) attr_data;
+ *data = (const char *) attr_data;
return 0;
}
@@ -962,7 +962,7 @@ int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type) {
return r;
} else if (nl_type->type == NLA_UNION) {
const NLTypeSystemUnion *type_system_union;
- char *key;
+ const char *key;
r = type_system_get_type_system_union(m->container_type_system[m->n_containers],
&type_system_union,