]> jfr.im git - irc/rizon/plexus4.git/commitdiff
shedding: Rename rate to new_rate in m_shedding()
authorstaticfox <redacted>
Tue, 10 May 2016 19:51:52 +0000 (15:51 -0400)
committerstaticfox <redacted>
Tue, 10 May 2016 19:51:52 +0000 (15:51 -0400)
Otherwise, we shadow `rate` as it's globally defined within m_shedding.c.
(Silences -Wshaddow)

modules/m_shedding.c

index 68bc2d8a31f99452d57ad68ab2e8ed64db334d5b..f83d7a6d3a8a5b6bfbc17885faf9e16099ade45c 100644 (file)
@@ -92,7 +92,7 @@ static void
 user_shedding_shed(void *unused)
 {
   dlink_node *ptr;
-  
+
   DLINK_FOREACH_PREV(ptr, local_client_list.tail)
   {
       struct Client *client_p = ptr->data;
@@ -172,22 +172,22 @@ m_shedding(struct Client *client_p, struct Client *source_p, int parc, char **pa
     return;
   }
 
-  int rate = atoi(arg);
-  if (rate < SHED_RATE_MIN)
+  int new_rate = atoi(arg);
+  if (new_rate < SHED_RATE_MIN)
   {
     sendto_one(source_p, ":%s NOTICE %s :Rate may not be less than %d", me.name, source_p->name, SHED_RATE_MIN);
     return;
   }
 
   shed_off();
-    
+
   sendto_snomask(SNO_ALL, L_ALL | SNO_ROUTE,
-                 "User shedding ENABLED by %s. Shedding interval: %d seconds", 
-                 source_p->name, rate);
+                 "User shedding ENABLED by %s. Shedding interval: %d seconds",
+                 source_p->name, new_rate);
 
-  rate -= (rate/5);
+  new_rate -= (new_rate/5);
 
-  shed_on(rate);
+  shed_on(new_rate);
 }
 
 static void