~capttofu/drizzle/clientsplit

« back to all changes in this revision

Viewing changes to mysys/mf_tempdir.c

  • Committer: Patrick Galbraith
  • Date: 2008-07-22 01:04:17 UTC
  • mfrom: (77.1.143 clientsplit)
  • Revision ID: patg@ishvara-20080722010417-g5x7tm65e3ci36sb
Resolved conflicts.... seems monty had also converted the programs in client

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
{
23
23
  char *end, *copy;
24
24
  char buff[FN_REFLEN];
25
 
  DBUG_ENTER("init_tmpdir");
26
 
  DBUG_PRINT("enter", ("pathlist: %s", pathlist ? pathlist : "NULL"));
27
25
 
28
26
  pthread_mutex_init(&tmpdir->mutex, MY_MUTEX_INIT_FAST);
29
27
  if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5))
43
41
    length= cleanup_dirname(buff, buff);
44
42
    if (!(copy= my_strndup(buff, length, MYF(MY_WME))) ||
45
43
        insert_dynamic(&tmpdir->full_list, (uchar*) &copy))
46
 
      DBUG_RETURN(true);
 
44
      return(true);
47
45
    pathlist=end+1;
48
46
  }
49
47
  while (*end);
51
49
  tmpdir->list=(char **)tmpdir->full_list.buffer;
52
50
  tmpdir->max=tmpdir->full_list.elements-1;
53
51
  tmpdir->cur=0;
54
 
  DBUG_RETURN(false);
 
52
  return(false);
55
53
 
56
54
err:
57
55
  delete_dynamic(&tmpdir->full_list);           /* Safe to free */
58
56
  pthread_mutex_destroy(&tmpdir->mutex);
59
 
  DBUG_RETURN(true);
 
57
  return(true);
60
58
}
61
59
 
62
60