Print this page
3900 illumos will not build against gcc compiled perl
4723 Remove unused perl extensions
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
@@ -19,10 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 Racktop Systems.
*/
/*
* Kstat.xs is a Perl XS (eXStension module) that makes the Solaris
* kstat(3KSTAT) facility available to Perl scripts. Kstat is a general-purpose
@@ -892,38 +893,36 @@
static int
apply_to_ties(SV *self, ATTCb_t cb, void *arg)
{
HV *hash1;
HE *entry1;
- long s;
int ret;
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 1;
/* Iterate over each module */
- while (entry1 = hv_iternext(hash1)) {
+ while ((entry1 = hv_iternext(hash1))) {
HV *hash2;
HE *entry2;
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
- while (entry2 = hv_iternext(hash2)) {
+ while ((entry2 = hv_iternext(hash2))) {
HV *hash3;
HE *entry3;
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
- while (entry3 = hv_iternext(hash3)) {
+ while ((entry3 = hv_iternext(hash3))) {
HV *hash4;
MAGIC *mg;
- HV *tie;
/* Get the tie */
hash4 = (HV *)SvRV(hv_iterval(hash3, entry3));
mg = mg_find((SV *)hash4, 'P');
PERL_ASSERTMSG(mg != 0,
@@ -974,29 +973,29 @@
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 0;
/* Iterate over each module */
- while (entry1 = hv_iternext(hash1)) {
+ while ((entry1 = hv_iternext(hash1))) {
HV *hash2;
HE *entry2;
module = HePV(entry1, PL_na);
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
- while (entry2 = hv_iternext(hash2)) {
+ while ((entry2 = hv_iternext(hash2))) {
HV *hash3;
HE *entry3;
instance = HePV(entry2, PL_na);
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
- while (entry3 = hv_iternext(hash3)) {
+ while ((entry3 = hv_iternext(hash3))) {
HV *hash4;
MAGIC *mg;
HV *tie;
name = HePV(entry3, PL_na);
@@ -1082,11 +1081,11 @@
value = newSVpv(KSTAT_NAMED_STR_PTR(knp),
KSTAT_NAMED_STR_BUFLEN(knp) -1);
break;
default:
PERL_ASSERTMSG(0, "kstat_read: invalid data type");
- break;
+ continue;
}
hv_store(self, knp->name, strlen(knp->name), value, 0);
}
}
@@ -1623,11 +1622,11 @@
HE *he;
PPCODE:
self = SvRV(self);
read_kstats((HV *)self, FALSE);
hv_iterinit((HV *)self);
- if (he = hv_iternext((HV *)self)) {
+ if ((he = hv_iternext((HV *)self))) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}
#
@@ -1640,11 +1639,11 @@
SV* lastkey;
PREINIT:
HE *he;
PPCODE:
self = SvRV(self);
- if (he = hv_iternext((HV *)self)) {
+ if ((he = hv_iternext((HV *)self))) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}