summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-11-11 13:57:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2010-11-11 13:57:57 +0100
commit895839909804d91f6e897bef1c1e32c0b0a9db94 (patch)
tree69c638314836fd609cca9dfdbb771d2ab0f20dc9 /src
parent184d6ab767d6432a506ea00ae33ba7e054712786 (diff)
downloadlibmnl-895839909804d91f6e897bef1c1e32c0b0a9db94.tar.gz
libmnl-895839909804d91f6e897bef1c1e32c0b0a9db94.zip
nlmsg: use bool for mnl_nlmsg_ok()
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/attr.c2
-rw-r--r--src/nlmsg.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/attr.c b/src/attr.c
index c60e1f4..69fda0b 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -90,7 +90,7 @@ void *mnl_attr_get_payload(const struct nlattr *attr)
* The len parameter may be negative in the case of malformed messages during
* attribute iteration, that is why we use a signed integer.
*/
-int mnl_attr_ok(const struct nlattr *attr, int len)
+bool mnl_attr_ok(const struct nlattr *attr, int len)
{
return len >= (int)sizeof(struct nlattr) &&
attr->nla_len >= sizeof(struct nlattr) &&
diff --git a/src/nlmsg.c b/src/nlmsg.c
index a3dc0c1..e05fb50 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -156,7 +156,7 @@ void *mnl_nlmsg_get_payload_offset(const struct nlmsghdr *nlh, size_t offset)
* The len parameter may become negative in malformed messages during message
* iteration, that is why we use a signed integer.
*/
-int mnl_nlmsg_ok(const struct nlmsghdr *nlh, int len)
+bool mnl_nlmsg_ok(const struct nlmsghdr *nlh, int len)
{
return len >= (int)sizeof(struct nlmsghdr) &&
nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&