Changeset 58 in MondoRescue for trunk/mondo/mondo/common/libmondo-string.c
- Timestamp:
- Oct 10, 2005, 11:22:08 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-string.c
r57 r58 122 122 { 123 123 char *pos_w_commas; 124 char *output;124 static char output[MAX_STR_LEN]; 125 125 char *tmp; 126 126 int j; … … 145 145 asprintf(&pos_w_commas, "%s", tmp); 146 146 } 147 asprintf(&output, "%s", pos_w_commas);147 strcpy(output, pos_w_commas); 148 148 paranoid_free(pos_w_commas); 149 149 paranoid_free(tmp); … … 250 250 assert(width > 2); 251 251 252 asprintf( &output, "%s", incoming);252 asprintf(output, "%s", incoming); 253 253 for (i = (int) strlen(output); i < width; i++) { 254 254 output[i] = ' '; … … 707 707 /*@ buffers ***************************************************** */ 708 708 char *tmp; 709 char *tmp1; 709 710 710 711 /*@ pointers **************************************************** */ … … 738 739 in_out[i++] = ' '; 739 740 } else if (in_out[i] == '\r') { 740 paranoid_free(tmp);741 asprintf(&tmp, "%s", in_out + i);742 strcpy(in_out, tmp);741 asprintf(&tmp1, "%s", in_out + i); 742 strcpy(in_out, tmp1); 743 paranoid_free(tmp1); 743 744 i = -1; 744 745 continue;
Note:
See TracChangeset
for help on using the changeset viewer.