Don't add "0" rows to a glpk problem
[lttv.git] / lttv / lttv / sync / event_analysis_eval.c
index 0c0b7b51a80e86fc3cb48cbf104e9bb14aca369c..39aa7cda93bec545109863f4517fbea9d026e00f 100644 (file)
@@ -78,7 +78,6 @@ static void writeAnalysisTraceTraceForePlotsEval(SyncState* const syncState,
        const unsigned int i, const unsigned int j);
 
 // Functions specific to this module
-static void registerAnalysisEval() __attribute__((constructor (102)));
 static guint ghfRttKeyHash(gconstpointer key);
 static gboolean gefRttKeyEqual(gconstpointer a, gconstpointer b);
 static void gdnDestroyRttKey(gpointer data);
@@ -156,7 +155,7 @@ static ModuleOption optionEvalRttFile= {
 /*
  * Analysis module registering function
  */
-static void registerAnalysisEval()
+void registerAnalysisEval()
 {
        binBase= exp10(6. / (BIN_NB - 3));
 
@@ -1538,7 +1537,10 @@ static glp_prob* lpCreateProblem(GQueue* const lowerHull, GQueue* const
 
        // Create the LP problem
        glp_term_out(GLP_OFF);
-       glp_add_rows(lp, hullPointNb);
+       if (hullPointNb > 0)
+       {
+               glp_add_rows(lp, hullPointNb);
+       }
        glp_add_cols(lp, 2);
 
        glp_set_col_name(lp, 1, "a0");
This page took 0.027687 seconds and 4 git commands to generate.