treewide: use get_random_u32_{above,below}() instead of manual loop
[sfrench/cifs-2.6.git] / net / ipv6 / output_core.c
index 2685c3f15e9d30e8500f32e6b1e39ce36bf3509c..b5205311f372bdaaff140d651e4b42b27a3ed805 100644 (file)
@@ -15,13 +15,7 @@ static u32 __ipv6_select_ident(struct net *net,
                               const struct in6_addr *dst,
                               const struct in6_addr *src)
 {
-       u32 id;
-
-       do {
-               id = get_random_u32();
-       } while (!id);
-
-       return id;
+       return get_random_u32_above(0);
 }
 
 /* This function exists only for tap drivers that must support broken