Commit 43d94f88 authored by unknown's avatar unknown

Rename rest() macro in my_list.h to list_rest(). (Bug #12327)


include/my_list.h:
  Rename rest() macro to list_rest().
mysys/list.c:
  rest() renamed to list_rest().
mysys/thr_lock.c:
  rest() renamed to list_rest().
sql/sql_test.cc:
  rest() renamed to list_rest().
parent 968ac75e
......@@ -36,7 +36,7 @@ extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument);
#define rest(a) ((a)->next)
#define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
......
......@@ -109,7 +109,7 @@ int list_walk(LIST *list, list_walk_action action, gptr argument)
{
if ((error = (*action)(list->data,argument)))
return error;
list=rest(list);
list=list_rest(list);
}
return 0;
}
......@@ -1127,7 +1127,8 @@ void thr_print_locks(void)
pthread_mutex_lock(&THR_LOCK_lock);
puts("Current locks:");
for (list=thr_lock_thread_list ; list && count++ < MAX_THREADS ; list=rest(list))
for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
list= list_rest(list))
{
THR_LOCK *lock=(THR_LOCK*) list->data;
VOID(pthread_mutex_lock(&lock->mutex));
......
......@@ -271,7 +271,7 @@ static void display_table_locks(void)
VOID(my_init_dynamic_array(&saved_table_locks,sizeof(TABLE_LOCK_INFO),open_cache.records + 20,50));
VOID(pthread_mutex_lock(&THR_LOCK_lock));
for (list=thr_lock_thread_list ; list ; list=rest(list))
for (list= thr_lock_thread_list; list; list= list_rest(list))
{
THR_LOCK *lock=(THR_LOCK*) list->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment