summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-05-24 15:39:44 +0300
committerToomas Soome <tsoome@me.com>2021-03-10 11:31:29 +0200
commitef1266efec4565fb64aeda150f6100dadde8bca8 (patch)
tree91790dc4059c9731750d089ce31c4a1898e99145
parentd464f34577edaa31dd6978ec04d66a57529dd2c8 (diff)
downloadillumos-joyent-ef1266efec4565fb64aeda150f6100dadde8bca8.tar.gz
13597 ipf: variable may be used uninitialized in this function
Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Robert French <robert@robertdfrench.me> Approved by: Joshua M. Clulow <josh@sysmgr.org>
-rwxr-xr-xusr/src/cmd/ipf/lib/common/printhash_live.c4
-rw-r--r--usr/src/cmd/ipf/lib/common/printpool_live.c4
-rw-r--r--usr/src/cmd/ipf/tools/ipfstat.c3
3 files changed, 3 insertions, 8 deletions
diff --git a/usr/src/cmd/ipf/lib/common/printhash_live.c b/usr/src/cmd/ipf/lib/common/printhash_live.c
index 082ee74bb4..f0b46f444f 100755
--- a/usr/src/cmd/ipf/lib/common/printhash_live.c
+++ b/usr/src/cmd/ipf/lib/common/printhash_live.c
@@ -7,8 +7,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/ioctl.h>
#include "ipf.h"
#include "netinet/ipl.h"
@@ -25,7 +23,7 @@ int opts;
{
iphtent_t entry, *top, *node;
ipflookupiter_t iter;
- int i, printed, last;
+ int i, printed = 0, last;
ipfobj_t obj;
if ((name != NULL) && strncmp(name, hp->iph_name, FR_GROUPLEN))
diff --git a/usr/src/cmd/ipf/lib/common/printpool_live.c b/usr/src/cmd/ipf/lib/common/printpool_live.c
index 77f95d84de..ad9c84413d 100644
--- a/usr/src/cmd/ipf/lib/common/printpool_live.c
+++ b/usr/src/cmd/ipf/lib/common/printpool_live.c
@@ -7,8 +7,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/ioctl.h>
#include "ipf.h"
#include "netinet/ipl.h"
@@ -25,7 +23,7 @@ int opts;
{
ip_pool_node_t entry, *top, *node;
ipflookupiter_t iter;
- int i, printed, last;
+ int i, printed = 0, last;
ipfobj_t obj;
if ((name != NULL) && strncmp(name, pool->ipo_name, FR_GROUPLEN))
diff --git a/usr/src/cmd/ipf/tools/ipfstat.c b/usr/src/cmd/ipf/tools/ipfstat.c
index d72f6ba97a..1a3a5f4be8 100644
--- a/usr/src/cmd/ipf/tools/ipfstat.c
+++ b/usr/src/cmd/ipf/tools/ipfstat.c
@@ -815,6 +815,7 @@ char *group, *comment;
int n;
ipfruleiter_t rule;
ipfobj_t obj;
+ u_long array[1000];
fb.fr_next = fp;
n = 0;
@@ -838,8 +839,6 @@ char *group, *comment;
obj.ipfo_ptr = &rule;
do {
- u_long array[1000];
-
memset(array, 0xff, sizeof(array));
fp = (frentry_t *)array;
rule.iri_rule = fp;