summaryrefslogtreecommitdiffstats
path: root/src/attr.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-10-22 21:02:27 +0200
committerJan Engelhardt <jengelh@medozas.de>2010-10-22 23:10:50 +0200
commitb0967993a76da06d306112bef31d9861b584fa07 (patch)
tree13029d52c736a247af7667ddc606bc33524cf00d /src/attr.c
parent412c9a6afaad4f790aa92667cea8cc0ef469a0c0 (diff)
attr: string functions should take char *
I do not quite see the point of using strlen in conjunction with non-string data; so let's use char * as argument types to catch misuses. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'src/attr.c')
-rw-r--r--src/attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attr.c b/src/attr.c
index f77f239..06d6367 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -443,7 +443,7 @@ void mnl_attr_put_u64(struct nlmsghdr *nlh, uint16_t type, uint64_t data)
* This function updates the length field of the Netlink message (nlmsg_len)
* by adding the size (header + payload) of the new attribute.
*/
-void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data)
+void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const char *data)
{
mnl_attr_put(nlh, type, strlen(data), data);
}
@@ -460,7 +460,7 @@ void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data)
* This function updates the length field of the Netlink message (nlmsg_len)
* by adding the size (header + payload) of the new attribute.
*/
-void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const void *data)
+void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const char *data)
{
mnl_attr_put(nlh, type, strlen(data)+1, data);
}