Blob Blame History Raw
--- SYMPHONY-5.6.17/src/LP/lp_proccomm.c.orig	2019-02-23 21:51:19.000000000 -0700
+++ SYMPHONY-5.6.17/src/LP/lp_proccomm.c	2019-06-22 13:30:05.638494993 -0600
@@ -838,9 +838,9 @@ void send_node_desc(lp_prob *p, int node
 	       PRINT_TIME2(p->tm, f);
 	       sprintf(reason, "%s %i", "branched", n->bc_index + 1);
 	       if (n->bc_index==0) {
-		  sprintf(reason, "%s %i", reason, 0);
+		  strcat(reason, " 0");
 	       } else {
-		  sprintf(reason, "%s %i", reason, n->parent->bc_index + 1);
+		  sprintf(&reason[strlen(reason)], " %i", n->parent->bc_index + 1);
 	       }
 
 	       char branch_dir='M';
@@ -854,7 +854,7 @@ void send_node_desc(lp_prob *p, int node
 		     branch_dir = 'R';
 		  }
 	       }
-	       sprintf(reason, "%s %c %f %f %i", reason, branch_dir,
+	       sprintf(&reason[strlen(reason)], " %c %f %f %i", branch_dir,
 		       lp_data->objval+p->mip->obj_offset, sum_inf, num_inf);
 	       fprintf(f, "%s\n", reason);
 	       FREE(reason);
--- SYMPHONY-5.6.17/src/TreeManager/tm_func.c.orig	2019-02-23 21:51:19.000000000 -0700
+++ SYMPHONY-5.6.17/src/TreeManager/tm_func.c	2019-06-22 13:26:47.070933884 -0600
@@ -1468,9 +1468,9 @@ int generate_children(tm_prob *tm, bc_no
 	    }
 	    if (action[i] == PRUNE_THIS_CHILD_FATHOMABLE ||
 		action[i] == PRUNE_THIS_CHILD_INFEASIBLE){
-	       sprintf(reason,"%s %c", reason, branch_dir);
+	       sprintf(&reason[strlen(reason)]," %c", branch_dir);
 	    }else{
-	       sprintf(reason,"%s %c %f", reason, branch_dir,
+	       sprintf(&reason[strlen(reason)]," %c %f", branch_dir,
 		       child->lower_bound);
 	    }
 	    fprintf(f,"%s\n",reason);
@@ -1825,10 +1825,9 @@ char shall_we_dive(tm_prob *tm, double o
    if (tm->par.vbc_emulation == VBC_EMULATION_FILE_NEW) {
       switch (category) {
        case VBC_PRUNED_INFEASIBLE:
-	 sprintf(reason, "%s", "infeasible");
-	 sprintf(reason,"%s %i", reason, node->bc_index+1);
+	 sprintf(reason, "infeasible %i", node->bc_index+1);
 	 if (node->bc_index>0) {
-	    sprintf(reason, "%s %i", reason, node->parent->bc_index+1);
+	    sprintf(&reason[strlen(reason)], " %i", node->parent->bc_index+1);
 	    if (node->parent->children[0]==node) {
 	       branch_dir = node->parent->bobj.sense[0];
 	       /*branch_dir = 'L';*/
@@ -1843,13 +1842,12 @@ char shall_we_dive(tm_prob *tm, double o
 	    sprintf(reason," 0");
 	 }
 	    
-	 sprintf(reason,"%s %c %s", reason, branch_dir, "\n");
+	 sprintf(&reason[strlen(reason)]," %c \n", branch_dir);
 	 break;
        case VBC_PRUNED_FATHOMED:
-	 sprintf(reason, "%s", "fathomed");
-	 sprintf(reason, "%s %i", reason, node->bc_index+1);
+	 sprintf(reason, "fathomed %i", node->bc_index+1);
 	 if (node->bc_index>0) {
-	    sprintf(reason,"%s %i", reason, node->parent->bc_index+1);
+	    sprintf(&reason[strlen(reason)]," %i", node->parent->bc_index+1);
 	    if (node->parent->children[0]==node) {
 	       branch_dir = node->parent->bobj.sense[0];
 	       /*branch_dir = 'L';*/
@@ -1863,7 +1861,7 @@ char shall_we_dive(tm_prob *tm, double o
 	 }else{
 	    sprintf(reason," 0");
 	 }
-	 sprintf(reason,"%s %c %s", reason, branch_dir, "\n");
+	 sprintf(&reason[strlen(reason)]," %c \n", branch_dir);
 	 break;
        case VBC_FEAS_SOL_FOUND:
 	 /* This case has already been dealt in install_new_ub(), hence
--- SYMPHONY-5.6.17/src/TreeManager/tm_proccomm.c.orig	2019-02-23 21:51:19.000000000 -0700
+++ SYMPHONY-5.6.17/src/TreeManager/tm_proccomm.c	2019-06-22 13:28:55.189650693 -0600
@@ -816,9 +816,9 @@ void receive_node_desc(tm_prob *tm, bc_n
 	       PRINT_TIME2(tm, f);
 	       sprintf(reason, "%s %i", "branched", n->bc_index + 1);
 	       if (n->bc_index==0) {
-		  sprintf(reason, "%s %i", reason, 0);
+		  strcat(reason, " 0");
 	       } else {
-		  sprintf(reason, "%s %i", reason, n->parent->bc_index + 1);
+		  sprintf(&reason[strlen(reason)], " %i", n->parent->bc_index + 1);
 	       }
 
 	       char branch_dir='M';
@@ -829,7 +829,7 @@ void receive_node_desc(tm_prob *tm, bc_n
 		     branch_dir = 'R';
 		  }
 	       }
-	       sprintf(reason, "%s %c %f %f %i", reason, branch_dir,
+	       sprintf(&reason[strlen(reason)], " %c %f %f %i", branch_dir,
 		       tm->lpp[n->lp]->lp_data->objval+
 		       tm->lpp[n->lp]->mip->obj_offset, sum_inf, num_inf);
 	       fprintf(f, "%s\n", reason);