~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/lock.cc

Removing deprecated functions from code and replacing them with C99 equivalents:
- replacing bcmp() calls with memcmp() calls
- replacing bfill() with memset()
- replacing bmove() and bcopy() with memcpy() or memmove()

The function memcpy_fixed() was apparantly introduced to fix a problem in gcc on
Alpha, but since it is not used consistently, it is likely not necessary any more.
It was replaced with memcpy().

Show diffs side-by-side

added added

removed removed

Lines of Context:
514
514
        removed_locks= table->lock_count;
515
515
 
516
516
        /* Move down all table pointers above 'i'. */
517
 
        bmove((char*) (locked->table+i),
518
 
              (char*) (locked->table+i+1),
519
 
              (old_tables - i) * sizeof(TABLE*));
 
517
        memcpy((char*) (locked->table+i),
 
518
               (char*) (locked->table+i+1),
 
519
               (old_tables - i) * sizeof(TABLE*));
520
520
 
521
521
        lock_data_end= table->lock_data_start + table->lock_count;
522
522
        /* Move down all lock data pointers above 'table->lock_data_end-1' */
523
 
        bmove((char*) (locked->locks + table->lock_data_start),
524
 
              (char*) (locked->locks + lock_data_end),
525
 
              (locked->lock_count - lock_data_end) *
526
 
              sizeof(THR_LOCK_DATA*));
 
523
        memcpy((char*) (locked->locks + table->lock_data_start),
 
524
               (char*) (locked->locks + lock_data_end),
 
525
               (locked->lock_count - lock_data_end) *
 
526
               sizeof(THR_LOCK_DATA*));
527
527
 
528
528
        /*
529
529
          Fix moved table elements.