History

net/hsr: Remove left-over never-true conditional code.

MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated as a part of *node_dst (which is a struct hsr_node). So the condition is always false. Detected by Dan Carpenter.

Arvid Brodin committed 12 years ago

Commit 279f64b1 parent 19278ca1 file · +0 −4Browse files

Unified · Split

net/hsr/hsr_framereg.c+0−4
@@ -290,10 +290,6 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb, · 289 unmodified lines
290 }290 }
291 if (port->type != node_dst->AddrB_port)291 if (port->type != node_dst->AddrB_port)
292 return;292 return;
293 if (!node_dst->MacAddressB) {
294 WARN_ONCE(1, "%s: No MacAddressB\n", __func__);
295 return;
296 }
297 293
298 ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB);294 ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB);
299}295}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t