k = (ensap[0] << 8) | ensap[1];
j = (ensap[2] << 8) | ensap[3];
i = (ensap[4] << 8) | ensap[5];
- }
- else
+ } else
i = j = k = 0;
tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)];
if (cur.base == -1)
cur.base = i, cur.len = 1;
else cur.len++;
- }
- else if (cur.base != -1) {
+ } else if (cur.base != -1) {
if (best.base == -1 || cur.len > best.len)
best = cur;
cur.base = -1;
permute_args(nonopt_start, nonopt_end,
optind, nargv);
optind -= nonopt_end - nonopt_start;
- }
- else if (nonopt_start != -1) {
+ } else if (nonopt_start != -1) {
/*
* If we skipped non-options, set optind
* to the first of them.
/* bytes[2,3] == (0,0); must be Auspex */
/* XXX or could be Ultrix+MASSBUS "hp" disk? */
fhtype = FHT_AUSPEX;
- }
- else {
+ } else {
/*
* bytes[2,3] != (0,0); rules out Auspex, could be
* DECOSF, SUNOS4, or IRIX4
(GET_U_1(fhp + 8) == 12) && (GET_U_1(fhp + 9) == 0)) {
/* seems to be DECOSF, with minor == 0 */
fhtype = FHT_DECOSF;
- }
- else {
+ } else {
/* could be SUNOS4 or IRIX4 */
/* XXX the test of fhp[5] == 8 could be wrong */
if ((GET_U_1(fhp + 4) == 0) && (GET_U_1(fhp + 5) == 8) && (GET_U_1(fhp + 6) == 0) &&
(GET_U_1(fhp + 7) == 0)) {
/* looks like a length, not a file system typecode */
fhtype = FHT_IRIX4;
- }
- else {
+ } else {
/* by elimination */
fhtype = FHT_SUNOS4;
}
}
}
- }
- else {
+ } else {
/*
* bytes[0,1] != (0,0); rules out Auspex, IRIX4, SUNOS4
* could be IRIX5, DECOSF, UCX, Ultrix, SUNOS5
/*XXX we probably only need to test of these two bytes */
else if ((len >= 24/4) && (GET_U_1(fhp + 21) == 0) && (GET_U_1(fhp + 23) == 0)) {
fhtype = FHT_ULTRIX;
- }
- else {
+ } else {
/* Could be SUNOS5/IRIX5, maybe AIX */
/* XXX no obvious difference between SUNOS5 and IRIX5 */
if (GET_U_1(fhp + 9) == 10)
fhtype = FHT_SUNOS5;
/* XXX what about AIX? */
}
- }
- else {
+ } else {
/*
* bytes[2,3] != (0,0); rules out Ultrix, could be
* DECOSF, SUNOS5, IRIX5, AIX, HP-UX, or UCX
*/
if ((GET_U_1(fhp + 8) == 12) && (GET_U_1(fhp + 9) == 0)) {
fhtype = FHT_DECOSF;
- }
- else if ((GET_U_1(fhp + 8) == 0) && (GET_U_1(fhp + 9) == 10)) {
+ } else if ((GET_U_1(fhp + 8) == 0) && (GET_U_1(fhp + 9) == 10)) {
/* could be SUNOS5/IRIX5, AIX, HP-UX */
if ((GET_U_1(fhp + 7) == 0) && (GET_U_1(fhp + 6) == 0) &&
(GET_U_1(fhp + 5) == 0) && (GET_U_1(fhp + 4) == 0)) {
/* XXX is this always true of HP-UX? */
fhtype = FHT_HPUX9;
- }
- else if (GET_U_1(fhp + 7) == 2) {
+ } else if (GET_U_1(fhp + 7) == 2) {
/* This would be MNT_NFS on AIX, which is impossible */
fhtype = FHT_SUNOS5; /* or maybe IRIX5 */
- }
- else {
+ } else {
/*
* XXX Could be SUNOS5/IRIX5 or AIX. I don't
* XXX see any way to disambiguate these, so
*/
fhtype = FHT_SUNOS5; /* or maybe IRIX5 */
}
- }
- else {
+ } else {
if (is_UCX(ndo, fhp, len)) {
fhtype = FHT_VMSUCX;
- }
- else {
+ } else {
fhtype = FHT_UNKNOWN;
}
}
memset((char *)fsidp, 0, sizeof(*fsidp));
/* just use the whole thing */
memcpy((char *)fsidp, (const char *)fh, 14);
- }
- else {
+ } else {
uint32_t tempa[4]; /* at least 16 bytes, maybe more */
memset((char *)tempa, 0, sizeof(tempa));
return(0);
else
continue;
- }
- else if (GET_U_1(fhp + i) == 0) {
+ } else if (GET_U_1(fhp + i) == 0) {
seen_null = 1;
continue;
- }
- else
+ } else
return(0);
}
/* garbage, hexdump it all */
if (shutdown_comm_length > length - 1) {
ND_PRINT(", invalid Shutdown Communication length");
- }
- else if (shutdown_comm_length == 0) {
+ } else if (shutdown_comm_length == 0) {
ND_PRINT(", empty Shutdown Communication");
remainder_offset += 1;
}
ND_PRINT("IPv4 (%u) %s", num, GET_IPADDR_STRING(p));
p += al;
l -= al;
- }
- else if (pt == PT_IEEE_802_2 && pl == 8 &&
+ } else if (pt == PT_IEEE_802_2 && pl == 8 &&
memcmp(p, prot_ipv6, 8) == 0 && al == 16) {
/*
* IPv6: protocol type = IEEE 802.2 header,
ND_PRINT("IPv6 (%u) %s", num, GET_IP6ADDR_STRING(p));
p += al;
l -= al;
- }
- else {
+ } else {
/*
* Generic case: just print raw data
*/
if (arcount)
goto trunc;
}
- }
- else {
+ } else {
/* this is a request */
ND_PRINT("%u%s%s%s", GET_BE_U_2(np->id),
ns_ops[DNS_OPCODE(flags)],
ND_PRINT(" [%uq]", qdcount);
if (ancount != 1)
ND_PRINT(" [%ua]", ancount);
- }
- else {
+ } else {
if (ancount)
ND_PRINT(" [%ua]", ancount);
if (qdcount != 1)
fdst[i] = fddi_bit_swap[fddip->fddi_dhost[i]];
for (i = 0; i < 6; ++i)
fsrc[i] = fddi_bit_swap[fddip->fddi_shost[i]];
- }
- else {
+ } else {
memcpy(fdst, (const char *)fddip->fddi_dhost, 6);
memcpy(fsrc, (const char *)fddip->fddi_shost, 6);
}
dlci = ((GET_U_1(p) & 0x3F) << 4) | ((GET_U_1(p + 1) & 0x78) >> 3);
if (ielength == 4) {
dlci = (dlci << 6) | ((GET_U_1(p + 2) & 0x7E) >> 1);
- }
- else if (ielength == 5) {
+ } else if (ielength == 5) {
dlci = (dlci << 13) | (GET_U_1(p + 2) & 0x7F) | ((GET_U_1(p + 3) & 0x7E) >> 1);
}
if (ndo->ndo_vflag) {
if (! geneve_opts_print(ndo, bp, opts_len))
goto invalid;
- }
- else {
+ } else {
ND_TCHECK_LEN(bp, opts_len);
ND_PRINT("%u bytes", opts_len);
}
if (ND_TTEST_2(uh->uh_dport)) {
*prot = nh;
return(uh);
- }
- else
+ } else
return(NULL);
/* NOTREACHED */
if (len) {
ND_PRINT("bad-len %u", len);
return;
- }
- else {
+ } else {
/* we guess that it is a TSO send */
len = length;
}
ND_PRINT(": IPv4 prefix (invalid length)");
else
ND_PRINT(": IPv4 prefix %s", buf);
- }
- else if (af == AFNUM_IP6) {
+ } else if (af == AFNUM_IP6) {
i=decode_prefix6(ndo, tptr, tlv_tlen, buf, sizeof(buf));
if (i == -2)
goto trunc;
ND_PRINT(": IPv6 prefix (invalid length)");
else
ND_PRINT(": IPv6 prefix %s", buf);
- }
- else
+ } else
ND_PRINT(": Address family %u prefix", af);
break;
case LDP_FEC_HOSTADDRESS:
else {
if (i + 1 < len) {
optlen = GET_U_1(bp + i + 1) + 2;
- }
- else
+ } else
goto trunc;
}
if (i + optlen > len)
sizeof(ip->ip_src));
UNALIGNED_MEMCPY(&xmep->server, ip->ip_dst,
sizeof(ip->ip_dst));
- }
- else if (ip6) {
+ } else if (ip6) {
xmep->ipver = 6;
UNALIGNED_MEMCPY(&xmep->client, ip6->ip6_src,
sizeof(ip6->ip6_src));
bp += NSH_HDR_WORD_SIZE;
}
past_headers = 1;
- }
- else if (md_type == MD_TYPE2) {
+ } else if (md_type == MD_TYPE2) {
n = 0;
while (n < length - 2) {
uint16_t tlv_class;
msg_tlen = msg_len - sizeof(struct olsr_msg6);
msg_data = tptr + sizeof(struct olsr_msg6);
- }
- else { /* (!is_ipv6) */
+ } else { /* (!is_ipv6) */
ND_TCHECK_LEN(tptr, sizeof(struct olsr_msg4));
msgptr.v4 = (const struct olsr_msg4 *) tptr;
msg_type = GET_U_1(msgptr.v4->msg_type);
msg_data += sizeof(struct olsr_hna6);
msg_tlen -= sizeof(struct olsr_hna6);
}
- }
- else {
+ } else {
int col = 0;
ND_PRINT("\n\t Advertised networks (total %u)",
&& ! (wildcards & OFPFW_NW_PROTO) && nw_proto == IPPROTO_ICMP
? "icmp_code" : "tp_dst";
ND_PRINT("%smatch %s %u", pfx, field_name, GET_BE_U_2(cp));
- }
- else
+ } else
ND_TCHECK_2(cp);
}
if (af == AFNUM_IP) {
if (!silent)
ND_PRINT("%s", GET_IPADDR_STRING(bp));
- }
- else if (af == AFNUM_IP6) {
+ } else if (af == AFNUM_IP6) {
if (!silent)
ND_PRINT("%s", GET_IP6ADDR_STRING(bp));
}
if (GET_U_1(bp + 1) != 32)
ND_PRINT("/%u", GET_U_1(bp + 1));
}
- }
- else if (af == AFNUM_IP6) {
+ } else if (af == AFNUM_IP6) {
if (!silent) {
ND_PRINT("%s", GET_IP6ADDR_STRING(bp + 2));
if (GET_U_1(bp + 1) != 128)
ND_PRINT("Tag[%u] ", GET_U_1(data));
data++;
data_value = GET_BE_U_3(data);
- }
- else {
+ } else {
data_value = GET_BE_U_4(data);
}
if ( data_value <= (uint32_t)(attr_type[attr_code].siz_subtypes - 1 +
ND_PRINT("%s", table[data_value]);
else
ND_PRINT("#%u", data_value);
- }
- else {
+ } else {
switch(attr_code) /* Be aware of special cases... */
{
case FRM_IPX:
GET_U_1(rad->id),
len);
return;
- }
- else {
+ } else {
ND_PRINT("RADIUS, length: %u\n\t%s (%u), id: 0x%02x, Authenticator: ",
len,
tok2str(radius_command_values,"Unknown Command",GET_U_1(rad->code)),
goto invalid;
if (! recurse) {
ND_TCHECK_LEN(tptr, tlen + encapsulated_pdu_length);
- }
- else {
+ } else {
ND_PRINT("%s-----encapsulated PDU-----", indent_string(indent+4));
rpki_rtr_pdu_print(ndo, tptr + tlen,
encapsulated_pdu_length, 0, indent + 2);
} else
ND_PRINT("[udp sum ok] ");
}
- }
- else if (IP_V(ip) == 6) {
+ } else if (IP_V(ip) == 6) {
/* for IPv6, UDP checksum is mandatory */
if (ND_TTEST_LEN(cp, length)) {
sum = udp6_cksum(ndo, ip6, up, length + sizeof(struct udphdr));