vserver 1.9.5.x5
[linux-2.6.git] / net / x25 / x25_proc.c
index ef3140d..37c9447 100644 (file)
@@ -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,