]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
expr: data_reg: get rid of leftover perror() calls
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 10 Jun 2016 12:49:01 +0000 (14:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jun 2016 11:26:32 +0000 (13:26 +0200)
Let the client of this library decide when to display error messages.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/expr/data_reg.c

index 6aa47bcdf83b5dbeed2bd138fff104ce3f8d616c..688823bc85d8d41ce5fca6916591755a2d8f9669 100644 (file)
@@ -428,10 +428,8 @@ nftnl_parse_verdict(union nftnl_data_reg *data, const struct nlattr *attr, int *
 {
        struct nlattr *tb[NFTA_VERDICT_MAX+1];
 
-       if (mnl_attr_parse_nested(attr, nftnl_verdict_parse_cb, tb) < 0) {
-               perror("mnl_attr_parse_nested");
+       if (mnl_attr_parse_nested(attr, nftnl_verdict_parse_cb, tb) < 0)
                return -1;
-       }
 
        if (!tb[NFTA_VERDICT_CODE])
                return -1;
@@ -491,10 +489,9 @@ int nftnl_parse_data(union nftnl_data_reg *data, struct nlattr *attr, int *type)
        struct nlattr *tb[NFTA_DATA_MAX+1] = {};
        int ret = 0;
 
-       if (mnl_attr_parse_nested(attr, nftnl_data_parse_cb, tb) < 0) {
-               perror("mnl_attr_parse_nested");
+       if (mnl_attr_parse_nested(attr, nftnl_data_parse_cb, tb) < 0)
                return -1;
-       }
+
        if (tb[NFTA_DATA_VALUE]) {
                if (type)
                        *type = DATA_VALUE;