* dyn.c (DynDelete, DynInsert, DynPut): Delete bcopy branches.
authorKen Raeburn <raeburn@mit.edu>
Thu, 30 Mar 2006 10:26:46 +0000 (10:26 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 30 Mar 2006 10:26:46 +0000 (10:26 +0000)
(HAVE_MEMMOVE): Don't define.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17807 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/rpc/ChangeLog
src/lib/rpc/dyn.c

index 11603694cb095a48cdbc5cf0dc4b66af1db63440..0707c279adc45062e9f5dd57c6e20706615de740 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-30  Ken Raeburn  <raeburn@mit.edu>
+
+       * dyn.c (DynDelete, DynInsert, DynPut): Delete bcopy branches.
+       (HAVE_MEMMOVE): Don't define.
+
 2006-03-28  Ken Raeburn  <raeburn@mit.edu>
 
        * configure.in: Always supply three arguments to
index 0b5bd0f271f31095c5f9dd56f70deef9db971ee5..192095cbc9e288459645bb4d4a544290af11b65f 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "dynP.h"
 
-#define HAVE_MEMMOVE 1
-
 
 /* old dyn_append.c */
 /*
@@ -192,15 +190,9 @@ int DynDelete(obj, idx)
                       obj->el_size*(obj->num_el - idx), obj->array,
                       (idx+1)*obj->el_size, idx*obj->el_size);
          
-#ifdef HAVE_MEMMOVE
          memmove(obj->array + idx*obj->el_size,
                  obj->array + (idx+1)*obj->el_size,
                  (size_t) obj->el_size*(obj->num_el - idx));
-#else
-         bcopy(obj->array + (idx+1)*obj->el_size,
-                 obj->array + idx*obj->el_size,
-                 obj->el_size*(obj->num_el - idx));
-#endif
          if (obj->paranoid) {
               if (obj->debug)
                    fprintf(stderr,
@@ -274,25 +266,15 @@ int DynInsert(obj, idx, els_in, num)
 
      if ((ret = _DynResize(obj, obj->num_el + num)) != DYN_OK)
          return ret;
-#ifdef HAVE_MEMMOVE
      memmove(obj->array + obj->el_size*(idx + num),
             obj->array + obj->el_size*idx,
             (size_t) ((obj->num_el-idx)*obj->el_size));
-#else
-     bcopy(obj->array + obj->el_size*idx,
-          obj->array + obj->el_size*(idx + num), 
-          (obj->num_el-idx)*obj->el_size);
-#endif      
 
      if (obj->debug)
          fprintf(stderr, "dyn: insert: Copying %d bytes from %p to %p + %d\n",
                  obj->el_size*num, els, obj->array, obj->el_size*idx);
 
-#ifdef HAVE_MEMMOVE
      memmove(obj->array + obj->el_size*idx, els, (size_t) (obj->el_size*num));
-#else
-     bcopy(els, obj->array + obj->el_size*idx, obj->el_size*num);
-#endif     
      obj->num_el += num;
 
      if (obj->debug)
@@ -397,11 +379,7 @@ int DynPut(obj, el_in, idx)
      if ((ret = _DynResize(obj, idx)) != DYN_OK)
          return ret;
 
-#ifdef HAVE_MEMMOVE
      memmove(obj->array + idx*obj->el_size, el, (size_t) obj->el_size);
-#else
-     bcopy(el, obj->array + idx*obj->el_size, obj->el_size);
-#endif     
 
      if (obj->debug)
          fprintf(stderr, "dyn: put: done.\n");