Procházet zdrojové kódy

hypervisor: move va_end() from _ctl() to sc_hypervisor_ctl()

Having va_start() and va_end() in the same function is much better.
Samuel Pitoiset před 9 roky
rodič
revize
5bf7552cee
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      sc_hypervisor/src/sc_config.c

+ 1 - 3
sc_hypervisor/src/sc_config.c

@@ -202,8 +202,6 @@ static struct sc_hypervisor_policy_config* _ctl(unsigned sched_ctx, va_list varg
 		}
 	}
 
-	va_end(varg_list);
-
 	return later ? config : NULL;
 }
 
@@ -255,5 +253,5 @@ void sc_hypervisor_ctl(unsigned sched_ctx, ...)
 		starpu_pthread_mutex_unlock(&hypervisor.conf_mut[sched_ctx]);
 	}
 
-	return;
+	va_end(varg_list);
 }