r42766 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42765‎ | r42766 | r42767 >
Date:14:53, 29 October 2008
Author:mark
Status:old
Tags:
Comment:
Make alloc/flush logic consistent, clean up spacing, remove superfluous comments
Modified paths:
  • /trunk/routing/lvs/net/ipv4/ipvs/ip_vs_wcsh.c (modified) (history)

Diff [purge]

Index: trunk/routing/lvs/net/ipv4/ipvs/ip_vs_wcsh.c
@@ -90,7 +90,7 @@
9191 */
9292 static int
9393 ip_vs_wcsh_alloc_continuum(struct ip_vs_wcsh_data *sched_data,
94 - const struct ip_vs_service *svc)
 94+ const struct ip_vs_service *svc)
9595 {
9696 struct ip_vs_dest *dest;
9797
@@ -137,7 +137,7 @@
138138 */
139139 static void
140140 ip_vs_wcsh_create_continuum(const struct ip_vs_wcsh_data *sched_data,
141 - const struct ip_vs_service *svc)
 141+ const struct ip_vs_service *svc)
142142 {
143143 struct ip_vs_wcsh_dest_point *point;
144144 struct ip_vs_dest *dest;
@@ -184,8 +184,7 @@
185185 {
186186 struct ip_vs_wcsh_dest_point *point;
187187
188 - if (sched_data->pointcount == 0 || sched_data->continuum == NULL)
189 - return;
 188+ if (sched_data->continuum == NULL) return;
190189
191190 for (point = sched_data->continuum
192191 ; point != &sched_data->continuum[sched_data->pointcount]
@@ -263,7 +262,7 @@
264263
265264 static struct ip_vs_wcsh_dest_point *
266265 ip_vs_wcsh_get_nearest_point(const unsigned hashkey,
267 - const struct ip_vs_wcsh_data *sched_data)
 266+ const struct ip_vs_wcsh_data *sched_data)
268267 {
269268 unsigned int left, right;
270269
@@ -288,7 +287,7 @@
289288
290289 if (hashkey <= sched_data->continuum[mid].value)
291290 right = mid;
292 - else /* hashkey > sched_data->continuum[mid].value */
 291+ else
293292 left = mid;
294293 }
295294 /* continuum[right-1] < hashkey <= continuum[right] */
@@ -297,7 +296,7 @@
298297
299298 static struct ip_vs_wcsh_dest_point *
300299 ip_vs_wcsh_get_feasible_dest(struct ip_vs_wcsh_dest_point *start,
301 - const struct ip_vs_wcsh_data *sched_data)
 300+ const struct ip_vs_wcsh_data *sched_data)
302301 {
303302 struct ip_vs_wcsh_dest_point *point = start;
304303 unsigned int points_left = sched_data->pointcount;

Status & tagging log