Skip to contentSkip to conversation

Reg: redundancy in inet socket

DISCUSSION Tej Parkash 1 participant 1 message May 25, 2007

lore
Share & tools
lore
#0 lore raw
list_for_each_rcu(p, &inetsw[sock->type]) {
		answer = list_entry(p, struct inet_protosw, list);

		/* Check the non-wild match. */
		if (protocol == answer->protocol) {
			if (protocol != IPPROTO_IP)
				break;
		} else {
			/* Check for the two wild cases. */
			if (IPPROTO_IP == protocol) {
				protocol = answer->protocol;
				break;
			}
			if (IPPROTO_IP == answer->protocol)
				break;
		}

i think there is a problem in this code because if (protocol == answer->protocol) will be more like an assignment rather then comparison
pl cc to me.
TEJ