~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_tempdir.cc

  • Committer: Monty Taylor
  • Date: 2008-12-08 07:41:44 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208074144-bcv10c8p9g1h2n0z
Got closer...

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
      end= pathlist+strlen(pathlist);
43
43
    strncpy(buff, pathlist, FN_REFLEN-1);
44
44
    length= cleanup_dirname(buff, buff);
45
 
    copy= (char *)malloc(length);
46
 
    if (copy == NULL)
47
 
      return true;
48
 
    strncpy(copy, buff, length);
49
 
    if (insert_dynamic(&tmpdir->full_list, (unsigned char*) &copy))
 
45
    if (!(copy= strndup(buff, length)) ||
 
46
        insert_dynamic(&tmpdir->full_list, (unsigned char*) &copy))
50
47
      return(true);
51
48
    pathlist=end+1;
52
49
  } while (*end != '\0');