chiark / gitweb /
bug fix: fix return value in set min/max objective
[nlopt.git] / api / options.c
index 4a4936e78aa90f8779bf4b51334e775947b10af3..8b75c15b538c1b767a4535ba1f851aade34c8078 100644 (file)
@@ -231,7 +231,7 @@ nlopt_result NLOPT_STDCALL nlopt_set_precond_min_objective(nlopt_opt opt,
 nlopt_result NLOPT_STDCALL nlopt_set_min_objective(nlopt_opt opt,
                                                   nlopt_func f, void *f_data)
 {
-     nlopt_set_precond_min_objective(opt, f, NULL, f_data);
+     return nlopt_set_precond_min_objective(opt, f, NULL, f_data);
 }
 
 nlopt_result NLOPT_STDCALL nlopt_set_precond_max_objective(nlopt_opt opt, 
@@ -253,7 +253,7 @@ nlopt_result NLOPT_STDCALL nlopt_set_precond_max_objective(nlopt_opt opt,
 nlopt_result NLOPT_STDCALL nlopt_set_max_objective(nlopt_opt opt,
                                                   nlopt_func f, void *f_data)
 {
-     nlopt_set_precond_max_objective(opt, f, NULL, f_data);
+     return nlopt_set_precond_max_objective(opt, f, NULL, f_data);
 }
 
 /*************************************************************************/