- Timestamp:
- Dec 1, 2005, 10:26:01 AM (19 years ago)
- Location:
- trunk/mondo/mondo/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-devices.c
r146 r147 186 186 asprintf(&output, "default"); 187 187 } 188 return ( &output);188 return (output); 189 189 } 190 190 -
trunk/mondo/mondo/common/libmondo-filelist.c
r127 r147 260 260 return (0); 261 261 } 262 (void) fgets(&incoming, &n, fin);262 (void) getline(&incoming, &n, fin); 263 263 while (!feof(fin)) { 264 264 lino++; -
trunk/mondo/mondo/common/libmondo-fork.c
r130 r147 302 302 int retval = 0; 303 303 int res = 0; 304 int n = 0;305 304 int i; 306 305 … … 344 343 } 345 344 } 346 #ifdef _XWIN347 /* This only can update when newline goes into the file,348 but it's *much* prettier/faster on Qt. */349 tmp = NULL;350 while (does_file_exist(lockfile)) {351 while (!feof(fin)) {352 if (!getline(&tmp, &n, fin))353 break;354 log_to_screen(tmp);355 }356 usleep(500000);357 }358 paranoid_free(tmp);359 #else360 345 /* This works on Newt, and it gives quicker updates. */ 361 346 for (; does_file_exist(lockfile); sleep(1)) { … … 363 348 update_evalcall_form(1); 364 349 } 365 #endif366 350 /* Evaluate the status returned by pclose to get the exit code of the called program. */ 367 351 errno = 0; … … 905 889 int res; 906 890 char *curr_fifo; 907 char *prev_fifo ;891 char *prev_fifo = NULL; 908 892 char *oldest_fifo = NULL; 909 893 char *next_fifo; -
trunk/mondo/mondo/common/libmondo-stream.c
r146 r147 332 332 int res = 0; 333 333 int retval = 0; 334 char *fname = &res; /* Should NOT be NULL */334 char *fname = (char *)&res; /* Should NOT be NULL */ 335 335 336 336 // xattr … … 343 343 } 344 344 paranoid_free(fname); 345 fname = &res;345 fname = (char *)&res; 346 346 read_file_from_stream_to_file(bkpinfo, xattr_fname, *ptmp_size); 347 347 res = read_header_block_from_stream(ptmp_size, NULL, pctrl_chr); … … 355 355 } 356 356 paranoid_free(fname); 357 fname = &res;357 fname = (char *)&res; 358 358 if (*pctrl_chr != BLK_START_EXAT_FILE) { 359 359 wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr); … … 470 470 char *tmpdir; 471 471 char *old_fname; 472 char *p;473 /* BERLIOS: useless474 char suffix[16];475 */476 472 477 473 bufsize_K = (long long) (1024LL * (1 + g_tape_buffer_size_MB)); 478 474 asprintf(&tmpdir, "%s/tmpfs/backcatalog", td); 479 /* BERLIOS: useless480 if ((p = strrchr(latest_fname, '.'))) {481 strcpy(suffix, ++p);482 } else {483 suffix[0] = '\0';484 }485 */486 475 if (strstr(latest_fname, ".afio.") || strstr(latest_fname, ".star.")) { 487 476 type = fileset; … … 696 685 { 697 686 /*@ buffers ***************************************************** */ 698 char command;687 char *command; 699 688 700 689 /*@ end vars *************************************************** */ … … 823 812 char *tmp; 824 813 char *datablock; 825 char *temp_fname = bkpinfo; /* Should NOT be NULL */826 char *temp_cksum = bkpinfo; /* Should NOT be NULL */814 char *temp_fname = (char *)bkpinfo; /* Should NOT be NULL */ 815 char *temp_cksum = (char *)bkpinfo; /* Should NOT be NULL */ 827 816 char *actual_cksum; 828 817 … … 1116 1105 int res; 1117 1106 int ctrl_chr; 1118 char *temp_fname = &res; /* should NOT be NULL */1107 char *temp_fname = (char *)&res; /* should NOT be NULL */ 1119 1108 char *datablock; 1120 1109 long long temp_size, size; … … 1142 1131 log_msg(3, "Still trying to re-sync w/ tape"); 1143 1132 paranoid_free(temp_fname); 1144 temp_fname = &res;1133 temp_fname = (char *)&res; 1145 1134 } 1146 1135 while (ctrl_chr != BLK_START_FILE) { … … 1157 1146 if (ctrl_chr != BLK_START_FILE) { 1158 1147 paranoid_free(temp_fname); 1159 temp_fname = &res;1148 temp_fname = (char *)&res; 1160 1149 } 1161 1150 } … … 1183 1172 1184 1173 paranoid_free(temp_fname); 1185 temp_fname = &res;1174 temp_fname = (char *)&res; 1186 1175 res = read_header_block_from_stream(&temp_size, NULL, &ctrl_chr); 1187 1176 if (ctrl_chr != BLK_STOP_FILE) {
Note:
See TracChangeset
for help on using the changeset viewer.