Two minor code fixes
Subsystems (2)
Phil Sutter
reviewercover Two minor code fixes
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
Phil Sutter (2):
xlate: Fix for fd leak in error path
xlate: Drop dead code
lib/ipset.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.38.0
Phil Sutter
reviewerPATCH 1/2 xlate: Fix for fd leak in error path
A rather cosmetic issue though, the program will terminate anyway.
--- lib/ipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/ipset.c +1 -1
@@ -1999,7 +1999,7 @@ static int ipset_xlate_restore(struct ipset *ipset) ret =build_argv (ipset, c);if (ret <0 ) -return ret; +break ; cmd =ipset_parser (ipset, ipset->newargc, ipset->newargv);if (cmd <0 )
Signature · 1 line
2.38.0
Phil Sutter
reviewerPATCH 2/2 xlate: Drop dead code
In reply to Phil SutterSet type is not needed when manipulating elements, the assigned variable was unused in that case.
--- lib/ipset.c | 3 --- 1 file changed, 3 deletions(-)
lib/ipset.c +0 -3
@@ -1876,9 +1876,6 @@ static int ipset_xlate(struct ipset *ipset, enum ipset_cmd cmd, cmd ==IPSET_CMD_DEL ?"delete" :"get" , ipset_xlate_family(family), table, set); - typename =ipset_data_get (data,IPSET_OPT_TYPENAME ); - type =ipset_xlate_set_type (typename); - xlate_set = (struct ipset_xlate_set *)ipset_xlate_set_get (ipset, set);if (xlate_set && xlate_set->interval)
Signature · 1 line
2.38.0
Pablo Neira Ayuso
maintainerQuoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Did you run ipset xlate tests? These should not break those but just in case.
Phil Sutter
reviewerQuoted 8 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Did you run ipset xlate tests? These should not break those but just in case.
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Cheers, Phil
Pablo Neira Ayuso
maintainerQuoted 5 lines · Phil Sutter
Quoted 4 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
Quoted 8 lines
Quoted 4 lines
LGTM.
Did you run ipset xlate tests? These should not break those but just in case.
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Does this work after your testsuite updates? If so, push them out.
Phil Sutter
reviewerQuoted 8 lines · Pablo Neira Ayuso
Quoted 7 lines · Phil Sutter
Quoted 6 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Did you run ipset xlate tests? These should not break those but just in case.
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Does this work after your testsuite updates? If so, push them out.
Yes, it does. Should I push the testsuite updates, too? I'm uncertain about the s/vrrp/carp/, don't want to break anyone's test setup.
Cheers, Phil
Pablo Neira Ayuso
maintainerQuoted 12 lines · Phil Sutter
Quoted 11 lines · Pablo Neira Ayuso
Quoted 10 lines · Phil Sutter
Quoted 8 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Did you run ipset xlate tests? These should not break those but just in case.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Does this work after your testsuite updates? If so, push them out.
Yes, it does. Should I push the testsuite updates, too? I'm uncertain about the s/vrrp/carp/, don't want to break anyone's test setup.
I can see some distros still use vrrp en /etc/protocols, yes, I'm ambivalent on this one.
Phil Sutter
reviewerQuoted 17 lines · Pablo Neira Ayuso
Quoted 16 lines · Phil Sutter
Quoted 15 lines · Pablo Neira Ayuso
Quoted 13 lines · Phil Sutter
Quoted 8 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Did you run ipset xlate tests? These should not break those but just in case.
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Does this work after your testsuite updates? If so, push them out.
Yes, it does. Should I push the testsuite updates, too? I'm uncertain about the s/vrrp/carp/, don't want to break anyone's test setup.
I can see some distros still use vrrp en
/etc/protocols, yes, I'm ambivalent on this one.
Maybe better just use a different protocol which didn't get "renamed" recently? It's for testing purposes only and the actual value doesn't matter much, right?
Pablo Neira Ayuso
maintainerQuoted 23 lines · Phil Sutter
Quoted 22 lines · Pablo Neira Ayuso
Quoted 20 lines · Phil Sutter
Quoted 8 lines · Pablo Neira Ayuso
Quoted 7 lines · Phil Sutter
Quoted 6 lines · Pablo Neira Ayuso
Quoted 2 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
LGTM.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Did you run ipset xlate tests? These should not break those but just in case.
I didn't, thanks for the reminder. Testsuite fails, but it does with HEAD as well. And so does the other testsuite ("make tests"), BtW. I'll investigate.
Does this work after your testsuite updates? If so, push them out.
Yes, it does. Should I push the testsuite updates, too? I'm uncertain about the s/vrrp/carp/, don't want to break anyone's test setup.
Quoted 6 lines
Quoted 2 lines
I can see some distros still use vrrp en
/etc/protocols, yes, I'm ambivalent on this one.Maybe better just use a different protocol which didn't get "renamed" recently? It's for testing purposes only and the actual value doesn't matter much, right?
I agree that's fine for a test, yes.
Phil Sutter
reviewerQuoted 6 lines · Phil Sutter
These were identified by Coverity tool, no problems in practice. Still worth fixing to reduce noise in code checkers.
Phil Sutter (2):
xlate: Fix for fd leak in error path
xlate: Drop dead code
Series applied.