Ignore:
Timestamp:
Mar 27, 2012, 2:48:08 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • Uses mr_strcat again instead of multiple mr_asprintf
  • Generats the correct mdadm create command when using UUID for fixing #596. Needs to be checked
  • More valgrind warning reported that may be fixed here.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-filelist.c

    r2970 r2972  
    13371337    char *skip_these;
    13381338    char *new_with_pipe;
    1339     char *strtmp;
    1340     char *token;
     1339    char *strtmp = NULL;
     1340    char *token = NULL;
    13411341    char *find_excludes = NULL;
    13421342    static char *name_of_evalcall_form;
     
    13661366        malloc_string(name_of_evalcall_form);
    13671367        malloc_string(find_skeleton_marker);
    1368         while((token = mr_strtok(sth, delims, &lastpos))) {
    1369           mr_asprintf(&strtmp,"%s", find_excludes);
    1370           paranoid_free(find_excludes);
    1371           mr_asprintf(&find_excludes,"%s -path %s -prune -o", strtmp, token);
    1372           paranoid_free(strtmp);
     1368        while((token = mr_strtok(sth, delims, &lastpos)) != NULL) {
     1369          mr_strcat(find_excludes," -path %s -prune -o", token);
    13731370          mr_free(token);
    13741371        }
Note: See TracChangeset for help on using the changeset viewer.