Changeset 147 for trunk/mondo


Ignore:
Timestamp:
Dec 1, 2005, 10:26:01 AM (13 years ago)
Author:
bcornec
Message:

Quality errors handled

Location:
trunk/mondo/mondo/common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/libmondo-devices.c

    r146 r147  
    186186        asprintf(&output, "default");
    187187    }
    188     return (&output);
     188    return (output);
    189189}
    190190
  • trunk/mondo/mondo/common/libmondo-filelist.c

    r127 r147  
    260260        return (0);
    261261    }
    262     (void) fgets(&incoming, &n, fin);
     262    (void) getline(&incoming, &n, fin);
    263263    while (!feof(fin)) {
    264264        lino++;
  • trunk/mondo/mondo/common/libmondo-fork.c

    r130 r147  
    302302    int retval = 0;
    303303    int res = 0;
    304     int n = 0;
    305304    int i;
    306305
     
    344343        }
    345344    }
    346 #ifdef _XWIN
    347     /* 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 #else
    360345    /* This works on Newt, and it gives quicker updates. */
    361346    for (; does_file_exist(lockfile); sleep(1)) {
     
    363348        update_evalcall_form(1);
    364349    }
    365 #endif
    366350    /* Evaluate the status returned by pclose to get the exit code of the called program. */
    367351    errno = 0;
     
    905889    int res;
    906890    char *curr_fifo;
    907     char *prev_fifo;
     891    char *prev_fifo = NULL;
    908892    char *oldest_fifo = NULL;
    909893    char *next_fifo;
  • trunk/mondo/mondo/common/libmondo-stream.c

    r146 r147  
    332332    int res = 0;
    333333    int retval = 0;
    334     char *fname = &res;         /* Should NOT be NULL */
     334    char *fname = (char *)&res;         /* Should NOT be NULL */
    335335
    336336// xattr
     
    343343    }
    344344    paranoid_free(fname);
    345     fname = &res;
     345    fname = (char *)&res;
    346346    read_file_from_stream_to_file(bkpinfo, xattr_fname, *ptmp_size);
    347347    res = read_header_block_from_stream(ptmp_size, NULL, pctrl_chr);
     
    355355    }
    356356    paranoid_free(fname);
    357     fname = &res;
     357    fname = (char *)&res;
    358358    if (*pctrl_chr != BLK_START_EXAT_FILE) {
    359359        wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr);
     
    470470    char *tmpdir;
    471471    char *old_fname;
    472     char *p;
    473     /* BERLIOS: useless
    474        char suffix[16];
    475      */
    476472
    477473    bufsize_K = (long long) (1024LL * (1 + g_tape_buffer_size_MB));
    478474    asprintf(&tmpdir, "%s/tmpfs/backcatalog", td);
    479     /* BERLIOS: useless
    480        if ((p = strrchr(latest_fname, '.'))) {
    481        strcpy(suffix, ++p);
    482        } else {
    483        suffix[0] = '\0';
    484        }
    485      */
    486475    if (strstr(latest_fname, ".afio.") || strstr(latest_fname, ".star.")) {
    487476        type = fileset;
     
    696685{
    697686    /*@ buffers ***************************************************** */
    698     char command;
     687    char *command;
    699688
    700689    /*@ end vars *************************************************** */
     
    823812    char *tmp;
    824813    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 */
    827816    char *actual_cksum;
    828817
     
    11161105    int res;
    11171106    int ctrl_chr;
    1118     char *temp_fname = &res;    /* should NOT be NULL */
     1107    char *temp_fname = (char *)&res;    /* should NOT be NULL */
    11191108    char *datablock;
    11201109    long long temp_size, size;
     
    11421131        log_msg(3, "Still trying to re-sync w/ tape");
    11431132        paranoid_free(temp_fname);
    1144         temp_fname = &res;
     1133        temp_fname = (char *)&res;
    11451134    }
    11461135    while (ctrl_chr != BLK_START_FILE) {
     
    11571146        if (ctrl_chr != BLK_START_FILE) {
    11581147            paranoid_free(temp_fname);
    1159             temp_fname = &res;
     1148            temp_fname = (char *)&res;
    11601149        }
    11611150    }
     
    11831172
    11841173        paranoid_free(temp_fname);
    1185         temp_fname = &res;
     1174        temp_fname = (char *)&res;
    11861175        res = read_header_block_from_stream(&temp_size, NULL, &ctrl_chr);
    11871176        if (ctrl_chr != BLK_STOP_FILE) {
Note: See TracChangeset for help on using the changeset viewer.