diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-04-04 16:19:03 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-04-04 16:19:03 +0200 |
commit | bd00b928e678b3ede5dbc5abc933539fe5cc31e6 (patch) | |
tree | c598104414480b55bc819f679715ba55b9228a1e /src/attr.c | |
parent | 117f033c413820739e6679c926a39a5b3f45ff79 (diff) | |
download | libmnl-bd00b928e678b3ede5dbc5abc933539fe5cc31e6.tar.gz libmnl-bd00b928e678b3ede5dbc5abc933539fe5cc31e6.zip |
remove mnl_align() as it's been replaced by MNL_ALIGN()
We remove mnl_align() since it has been replaced by the macro
MNL_ALIGN(). The macro allows its use in static arrays and
such.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/attr.c')
-rw-r--r-- | src/attr.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -91,8 +91,8 @@ int mnl_attr_ok(const struct nlattr *attr, int len) */ struct nlattr *mnl_attr_next(const struct nlattr *attr, int *len) { - *len -= mnl_align(attr->nla_len); - return (struct nlattr *)((void *)attr + mnl_align(attr->nla_len)); + *len -= MNL_ALIGN(attr->nla_len); + return (struct nlattr *)((void *)attr + MNL_ALIGN(attr->nla_len)); } /** @@ -333,12 +333,12 @@ const char *mnl_attr_get_str(const struct nlattr *attr) void mnl_attr_put(struct nlmsghdr *nlh, int type, size_t len, const void *data) { struct nlattr *attr = mnl_nlmsg_get_tail(nlh); - int payload_len = mnl_align(sizeof(struct nlattr)) + len; + int payload_len = MNL_ALIGN(sizeof(struct nlattr)) + len; attr->nla_type = type; attr->nla_len = payload_len; memcpy(mnl_attr_get_data(attr), data, len); - nlh->nlmsg_len += mnl_align(payload_len); + nlh->nlmsg_len += MNL_ALIGN(payload_len); } /** |