summaryrefslogtreecommitdiffstats
path: root/src/attr.c
diff options
context:
space:
mode:
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 75c856b..2ec6dce 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -186,7 +186,7 @@ int mnl_attr_validate(const struct nlattr *attr, enum mnl_attr_data_type type)
{
int exp_len;
- if (type < 0 || type >= MNL_TYPE_MAX) {
+ if (type >= MNL_TYPE_MAX) {
errno = EINVAL;
return -1;
}
@@ -207,7 +207,7 @@ int mnl_attr_validate(const struct nlattr *attr, enum mnl_attr_data_type type)
int mnl_attr_validate2(const struct nlattr *attr,
enum mnl_attr_data_type type, int exp_len)
{
- if (type < 0 || type >= MNL_TYPE_MAX) {
+ if (type >= MNL_TYPE_MAX) {
errno = EINVAL;
return -1;
}