Ignore:
Timestamp:
May 10, 2007, 1:38:43 AM (13 years ago)
Author:
Bruno Cornec
Message:

Fix the function process_the_s_switch
Still improving conf file handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r1378 r1434  
    146146{
    147147    char *tmp = NULL;
    148     char *p = NULL;
    149148    char *q = NULL;
    150149
     
    153152
    154153    bkpinfo->media_size = 0L;   /* dummy value */
    155     for ( p = value; strchr(p, ','); p = strchr(p, ',') + 1) {
    156         mr_asprintf(&tmp, p);
    157         q = strchr(tmp, ',');
    158         if (q != NULL) {
    159             *q = '\0';
    160         }
    161         bkpinfo->media_size = friendly_sizestr_to_sizelong(tmp);
    162         mr_free(tmp);
    163 
    164         mr_msg(3, "media_size = %ld", bkpinfo->media_size);
    165     }
     154    mr_asprintf(&tmp, value);
     155    q = strchr(tmp, ',');
     156    if (q != NULL) {
     157        *q = '\0';
     158    }
     159    bkpinfo->media_size = friendly_sizestr_to_sizelong(tmp);
     160    mr_free(tmp);
     161
     162    mr_msg(3, "media_size = %ld", bkpinfo->media_size);
    166163    if (bkpinfo->media_size <= 0L) {
    167164        mr_msg(1, "You gave media an invalid size\n");
Note: See TracChangeset for help on using the changeset viewer.