ipfilter/libipf: printpool_live() consumer ignores return code

The single consumer of printpool_live() ignores the return code.
Avoid wasting resources on this.

MFC after:	2 weeks
This commit is contained in:
Cy Schubert 2022-09-22 11:26:23 -07:00
parent 5568c8b2c5
commit 00d8a28f19
2 changed files with 4 additions and 4 deletions

View File

@ -318,7 +318,7 @@ extern ipf_dstnode_t *printdstlistnode(ipf_dstnode_t *, copyfunc_t,
extern void printdstlistpolicy(ippool_policy_t);
extern struct ip_pool_s *printpool(struct ip_pool_s *, copyfunc_t,
char *, int, wordtab_t *);
extern struct ip_pool_s *printpool_live(struct ip_pool_s *, int,
extern void printpool_live(struct ip_pool_s *, int,
char *, int, wordtab_t *);
extern void printpooldata(ip_pool_t *, int);
extern void printpoolfield(void *, int, int);

View File

@ -9,7 +9,7 @@
#include "netinet/ipl.h"
ip_pool_t *
void
printpool_live(ip_pool_t *pool, int fd, char *name, int opts,
wordtab_t *fields)
{
@ -19,7 +19,7 @@ printpool_live(ip_pool_t *pool, int fd, char *name, int opts,
ipfobj_t obj;
if ((name != NULL) && strncmp(name, pool->ipo_name, FR_GROUPLEN))
return (pool->ipo_next);
return;
if (fields == NULL)
printpooldata(pool, opts);
@ -71,5 +71,5 @@ printpool_live(ip_pool_t *pool, int fd, char *name, int opts,
(void) ioctl(fd,SIOCIPFDELTOK, &iter.ili_key);
return (pool->ipo_next);
return;
}