Ignore:
Timestamp:
May 13, 2009, 4:34:00 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Remove useless function look_for_weird_formats
  • Adds a test program for mountlist management to find a seg. fault bug when using a large mountlist file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2190 r2202  
    664664        return (1);
    665665    }
    666     for (fgets(tmp, MAX_STR_LEN, fin); !feof(fin);
    667          fgets(tmp, MAX_STR_LEN, fin)) {
     666    for ((void)fgets(tmp, MAX_STR_LEN, fin); !feof(fin);
     667         (void)fgets(tmp, MAX_STR_LEN, fin)) {
    668668        p = strchr(tmp, '\'');
    669669        if (p) {
     
    698698            log_msg(4, "Cannot run 2nd command - non-fatal, fortunately");
    699699        } else {
    700             for (fgets(tmp, MAX_STR_LEN, fin); !feof(fin);
    701                  fgets(tmp, MAX_STR_LEN, fin)) {
     700            for ((void)fgets(tmp, MAX_STR_LEN, fin); !feof(fin);
     701                 (void)fgets(tmp, MAX_STR_LEN, fin)) {
    702702                log_msg(5, "--> '%s'", tmp);
    703703                if (tmp[0] != ' ' && tmp[1] != ' ') {
     
    11411141        return (FALSE);
    11421142    }
    1143     for (fgets(incoming, MAX_STR_LEN - 1, fin); !feof(fin);
    1144          fgets(incoming, MAX_STR_LEN - 1, fin)) {
     1143    for ((void)fgets(incoming, MAX_STR_LEN - 1, fin); !feof(fin);
     1144         (void)fgets(incoming, MAX_STR_LEN - 1, fin)) {
    11451145        if (strstr(incoming, device_with_space) //> incoming
    11461146            || strstr(incoming, device_with_tab))   // > incoming)
     
    13991399        }
    14001400        sprintf(tmp, "mkdir -p %s/isodir &> /dev/null", bkpinfo->tmpdir);
    1401         system(tmp);
     1401        (void)system(tmp);
    14021402        sprintf(tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir,
    14031403                bkpinfo->nfs_remote_dir, bkpinfo->prefix,
     
    18131813        if (bkpinfo->disaster_recovery) {
    18141814            sprintf(command ,"umount %s/isodir 2> /dev/null", bkpinfo->tmpdir);
    1815             system(command);
     1815            (void)system(command);
    18161816            if (!popup_and_get_string
    18171817                ("NFS share", "Which remote NFS share should I mount?",
     
    24522452        return ('\0');
    24532453    }
    2454     for (fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives);
    2455          fgets(current_drive, MAX_STR_LEN, pdrives)) {
     2454    for ((void)fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives);
     2455         (void)fgets(current_drive, MAX_STR_LEN, pdrives)) {
    24562456        strip_spaces(current_drive);
    24572457        log_it("looking at drive %s's MBR", current_drive);
     
    24902490            return ('\0');
    24912491        }
    2492         for (fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives);
    2493             fgets(current_drive, MAX_STR_LEN, pdrives)) {
     2492        for ((void)fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives);
     2493            (void)fgets(current_drive, MAX_STR_LEN, pdrives)) {
    24942494            strip_spaces(current_drive);
    24952495            log_it("looking at partition %s's BR", current_drive);
Note: See TracChangeset for help on using the changeset viewer.