~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rename.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
{
24
24
  register HP_SHARE *info;
25
25
  char *name_buff;
26
 
  DBUG_ENTER("heap_rename");
27
26
 
28
27
  pthread_mutex_lock(&THR_LOCK_heap);
29
28
  if ((info = hp_find_named_heap(old_name)))
31
30
    if (!(name_buff=(char*) my_strdup(new_name,MYF(MY_WME))))
32
31
    {
33
32
      pthread_mutex_unlock(&THR_LOCK_heap);
34
 
      DBUG_RETURN(my_errno);
 
33
      return(my_errno);
35
34
    }
36
 
    my_free(info->name,MYF(0));
 
35
    free(info->name);
37
36
    info->name=name_buff;
38
37
  }
39
38
  pthread_mutex_unlock(&THR_LOCK_heap);
40
 
  DBUG_RETURN(0);
 
39
  return(0);
41
40
}