diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-22 11:42:26 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-22 11:42:26 -0800 |
commit | 5c668704b7fa5a4ebf21a490ddfbd6dc2e01fc97 (patch) | |
tree | a5b4ee5df56025c077646a2b8cbdf5a23c2a1b89 /drivers/isdn | |
parent | b23e3536667373e44f52a907f63cb55f75969490 (diff) | |
download | kernel_samsung_smdk4412-5c668704b7fa5a4ebf21a490ddfbd6dc2e01fc97.zip kernel_samsung_smdk4412-5c668704b7fa5a4ebf21a490ddfbd6dc2e01fc97.tar.gz kernel_samsung_smdk4412-5c668704b7fa5a4ebf21a490ddfbd6dc2e01fc97.tar.bz2 |
[UDP]: Fix reversed logic in udp_get_port().
When this code was converted to use sk_for_each() the
logic for the "best hash chain length" code was reversed,
breaking everything.
The original code was of the form:
size = 0;
do {
if (++size >= best_size_so_far)
goto next;
} while ((sk = sk->next) != NULL);
best_size_so_far = size;
best = result;
next:;
and this got converted into:
sk_for_each(sk2, node, head)
if (++size < best_size_so_far) {
best_size_so_far = size;
best = result;
}
Which does something very very different from the original.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
0 files changed, 0 insertions, 0 deletions