~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_tempdir.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
      pathlist=(char*) P_tmpdir;
36
36
  }
37
37
  do {
38
 
    uint length;
 
38
    uint32_t length;
39
39
    end= strrchr(pathlist, DELIM);
40
40
    if (end == NULL)
41
41
      end= pathlist+strlen(pathlist);
42
42
    strmake(buff, pathlist, (uint) (end-pathlist));
43
43
    length= cleanup_dirname(buff, buff);
44
44
    if (!(copy= my_strndup(buff, length, MYF(MY_WME))) ||
45
 
        insert_dynamic(&tmpdir->full_list, (uchar*) &copy))
 
45
        insert_dynamic(&tmpdir->full_list, (unsigned char*) &copy))
46
46
      return(true);
47
47
    pathlist=end+1;
48
48
  } while (*end != '\0');
73
73
 
74
74
void free_tmpdir(MY_TMPDIR *tmpdir)
75
75
{
76
 
  uint i;
 
76
  uint32_t i;
77
77
  for (i=0; i<=tmpdir->max; i++)
78
 
    my_free(tmpdir->list[i], MYF(0));
 
78
    free(tmpdir->list[i]);
79
79
  delete_dynamic(&tmpdir->full_list);
80
80
  pthread_mutex_destroy(&tmpdir->mutex);
81
81
}