X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fx25%2Fx25_proc.c;h=37c9447e589bd3b3354c9fe22118120e3d034778;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=ef3140d1041ba5784fec506639def71bcd0ec9b8;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index ef3140d10..37c9447e5 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c @@ -32,10 +32,11 @@ static __inline__ struct x25_route *x25_get_route_idx(loff_t pos) list_for_each(route_entry, &x25_route_list) { rt = list_entry(route_entry, struct x25_route, node); - if (--pos) - break; + if (!pos--) + goto found; } - + rt = NULL; +found: return rt; } @@ -165,14 +166,14 @@ out: return 0; } -struct seq_operations x25_seq_route_ops = { +static struct seq_operations x25_seq_route_ops = { .start = x25_seq_route_start, .next = x25_seq_route_next, .stop = x25_seq_route_stop, .show = x25_seq_route_show, }; -struct seq_operations x25_seq_socket_ops = { +static struct seq_operations x25_seq_socket_ops = { .start = x25_seq_socket_start, .next = x25_seq_socket_next, .stop = x25_seq_socket_stop,