step 3: bcopy->memcpy or memmove (chose by hand), twiddle args
authorMark Eichin <eichin@mit.edu>
Wed, 15 Jun 1994 23:46:13 +0000 (23:46 +0000)
committerMark Eichin <eichin@mit.edu>
Wed, 15 Jun 1994 23:46:13 +0000 (23:46 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3821 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/pcbc_encrypt.c
src/lib/krb5/asn.1/adat2kadat.c
src/lib/krb5/asn.1/addr2kaddr.c
src/lib/krb5/asn.1/adr2kadr.c
src/lib/krb5/asn.1/ck2kck.c
src/lib/krb5/asn.1/enck2kkey.c
src/lib/krb5/asn.1/kdcr2kkdcr.c
src/lib/krb5/asn.1/qbuf2data.c
src/lib/krb5/asn.1/tgrq2ktgrq.c
src/lib/krb5/posix/strdup.c
src/slave/kprop.c

index e533a0db2c2a6a5a833483674b595d0bb2249c1c..8f85d2eda31b74c89f9bac8fb1c6c1a66e160c26 100644 (file)
@@ -102,8 +102,8 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
     if (encrypt) {
 #ifdef MUSTALIGN
        if ((long) ivec & 3) {
-           bcopy((char *)ivec++,(char *)&xor_0,sizeof(xor_0));
-           bcopy((char *)ivec,(char *)&xor_1,sizeof(xor_1));
+           memcpy((char *)&xor_0, (char *)ivec++,sizeof(xor_0));
+           memcpy((char *)&xor_1, (char *)ivec,  sizeof(xor_1));
        }
        else
 #endif
@@ -116,8 +116,8 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
            /* get input */
 #ifdef MUSTALIGN
            if ((long) input & 3) {
-               bcopy((char *)input,(char *)&t_input[0],sizeof(t_input[0]));
-               bcopy((char *)(input+1),(char *)&t_input[1],sizeof(t_input[1]));
+               memcpy((char *)&t_input[0], (char *)input,    sizeof(t_input[0]));
+               memcpy((char *)&t_input[1], (char *)(input+1),sizeof(t_input[1]));
            }
            else
 #endif
@@ -149,9 +149,9 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
             */
 #ifdef MUSTALIGN
            if ((long) input & 3) {
-               bcopy((char *)input++,(char *)&xor_0,sizeof(xor_0));
+               memcpy((char *)&xor_0, (char *)input++, sizeof(xor_0));
                xor_0 ^= t_output[0];
-               bcopy((char *)input++,(char *)&xor_1,sizeof(xor_1));
+               memcpy((char *)&xor_1, (char *)input++, sizeof(xor_1));
                xor_1 ^= t_output[1];
            }
            else
@@ -165,10 +165,10 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
            /* copy temp output and save it for cbc */
 #ifdef MUSTALIGN
            if ((long) output & 3) {
-               bcopy((char *)&t_output[0],(char *)output++,
-                     sizeof(t_output[0]));
-               bcopy((char *)&t_output[1],(char *)output++,
-                     sizeof(t_output[1]));
+               memcpy((char *)output++, (char *)&t_output[0],
+                      sizeof(t_output[0]));
+               memcpy((char *)output++, (char *)&t_output[1],
+                      sizeof(t_output[1]));
            }
            else
 #endif
@@ -195,8 +195,8 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
        /* decrypt */
 #ifdef MUSTALIGN
        if ((long) ivec & 3) {
-           bcopy((char *)ivec++,(char *)&xor_0,sizeof(xor_0));
-           bcopy((char *)ivec,(char *)&xor_1,sizeof(xor_1));
+           memcpy((char *)&xor_0, (char *)ivec++,sizeof(xor_0));
+           memcpy((char *)&xor_1, (char *)ivec,  sizeof(xor_1));
        }
        else
 #endif
@@ -209,8 +209,8 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
            /* get input */
 #ifdef MUSTALIGN
            if ((long) input & 3) {
-               bcopy((char *)input++,(char *)&t_input[0],sizeof(t_input[0]));
-               bcopy((char *)input++,(char *)&t_input[1],sizeof(t_input[1]));
+               memcpy((char *)&t_input[0],(char *)input++,sizeof(t_input[0]));
+               memcpy((char *)&t_input[1],(char *)input++,sizeof(t_input[1]));
            }
            else
 #endif
@@ -240,10 +240,10 @@ des_pcbc_encrypt(in,out,length,key,iv,encrypt)
            /* copy temp output */
 #ifdef MUSTALIGN
            if ((long) output & 3) {
-               bcopy((char *)&t_output[0],(char *)output++,
-                     sizeof(t_output[0]));
-               bcopy((char *)&t_output[1],(char *)output++,
-                     sizeof(t_output[1]));
+               memcpy((char *)output++, (char *)&t_output[0],
+                      sizeof(t_output[0]));
+               memcpy((char *)output++, (char *)&t_output[1],
+                      sizeof(t_output[1]));
            }
            else
 #endif
index c2669fd2defb8120dddb0394447559a1cbb5a8e0..4ee79c0081d736653fdd8091ab2ea42a8d620230 100644 (file)
@@ -80,8 +80,9 @@ register int *error;
        }
        retval[i]->ad_type = val->element_KRB5_2[i]->ad__type;
        retval[i]->length = val->element_KRB5_2[i]->ad__data->qb_forw->qb_len;
-       xbcopy(val->element_KRB5_2[i]->ad__data->qb_forw->qb_data,
-             &retval[i]->contents[0], retval[i]->length);
+       memcpy(&retval[i]->contents[0],
+              val->element_KRB5_2[i]->ad__data->qb_forw->qb_data, 
+              retval[i]->length);
     }
     retval[i] = 0;
     return(retval);
@@ -120,8 +121,9 @@ register int *error;
        }
        retval[i]->ad_type = rv->element_KRB5_2->ad__type;
        retval[i]->length = rv->element_KRB5_2->ad__data->qb_forw->qb_len;
-       xbcopy(rv->element_KRB5_2->ad__data->qb_forw->qb_data,
-             retval[i]->contents, retval[i]->length);
+       memcpy(retval[i]->contents,
+              rv->element_KRB5_2->ad__data->qb_forw->qb_data,
+              retval[i]->length);
     }
     retval[i] = 0;
     return(retval);
index db93c80819bc9bca81b9b2ef2fb67fe769860f0f..5c16977070d77bd2633495d468dcbba0d6b1e6ef 100644 (file)
@@ -81,8 +81,9 @@ register int *error;
        }
        retval[i]->addrtype = val->element_KRB5_0[i]->addr__type;
        retval[i]->length = val->element_KRB5_0[i]->address->qb_forw->qb_len;
-       xbcopy(val->element_KRB5_0[i]->address->qb_forw->qb_data,
-             retval[i]->contents, retval[i]->length);
+       memcpy(retval[i]->contents,
+              val->element_KRB5_0[i]->address->qb_forw->qb_data,
+              retval[i]->length);
     }
     retval[i] = 0;
     return(retval);
@@ -121,8 +122,9 @@ register int *error;
        }
        retval[i]->addrtype = rv->element_KRB5_0->addr__type;
        retval[i]->length = rv->element_KRB5_0->address->qb_forw->qb_len;
-       xbcopy(rv->element_KRB5_0->address->qb_forw->qb_data,
-             retval[i]->contents, retval[i]->length);
+       memcpy(retval[i]->contents,
+              rv->element_KRB5_0->address->qb_forw->qb_data,
+              retval[i]->length);
     }
     retval[i] = 0;
     return(retval);
index c1dba53c0ab34e6a15ec70033d1b8ab0be01549c..ded8526e220c1f7543be05f7292aeb9df31d3092 100644 (file)
@@ -69,8 +69,7 @@ register int *error;
     }
     retval->addrtype = val->addr__type;
     retval->length = val->address->qb_forw->qb_len;
-    xbcopy(val->address->qb_forw->qb_data,
-          retval->contents, retval->length);
+    memcpy(retval->contents, val->address->qb_forw->qb_data, retval->length);
     return(retval);
 }
 
index fc4c725ab2194f4a2de8a5426e5343fca497369c..b305d99ad2fbf093a313903ccbf3f70eb9a7f7e7 100644 (file)
@@ -70,7 +70,7 @@ register int *error;
     }
     retval->checksum_type = val->cksumtype;
     retval->length = val->checksum->qb_forw->qb_len;
-    xbcopy(val->checksum->qb_forw->qb_data, retval->contents,
-         val->checksum->qb_forw->qb_len);
+    memcpy(retval->contents, val->checksum->qb_forw->qb_data,
+          val->checksum->qb_forw->qb_len);
     return(retval);
 }
index 9ad82e4565e447390b79f808863f5b03241f6b70..700d1afb5f3284d7c517a984fa51fde5dcc54d32 100644 (file)
@@ -71,8 +71,8 @@ register int *error;
     }
     retval->keytype = val->keytype;
     retval->length = val->keyvalue->qb_forw->qb_len;
-    xbcopy(val->keyvalue->qb_forw->qb_data, retval->contents,
-         val->keyvalue->qb_forw->qb_len);
+    memcpy(retval->contents, val->keyvalue->qb_forw->qb_data,
+          val->keyvalue->qb_forw->qb_len);
     return(retval);
 }
 
index 5676fedb0c9ac44b1da7f4e1fed1c5bb80248d38..d6e5694d3a73adeff897b110b3088ba4fd365ce3 100644 (file)
@@ -84,8 +84,9 @@ element_KRB5_112krb5_pa_data(val, error)
                *error = ENOMEM;
                return(0);
            }
-           xbcopy(rv->PA__DATA->pa__data->qb_forw->qb_data,
-                  retval[i]->contents, retval[i]->length);
+           memcpy(retval[i]->contents,
+                  rv->PA__DATA->pa__data->qb_forw->qb_data,
+                  retval[i]->length);
         } else
            retval[i]->contents = 0;
     }
index 1e36ce53a7265e6a7b2554aeabf48dd3cbe54bc9..a11ee8f4384c16936606816a4b5f4554b1da49ae 100644 (file)
@@ -68,8 +68,8 @@ register int *error;
        krb5_xfree(retval);
        goto nomem;
     }
-    xbcopy(val->qb_forw->qb_data, retval->data,
-         val->qb_forw->qb_len);
+    memcpy(retval->data, val->qb_forw->qb_data,
+          val->qb_forw->qb_len);
     return(retval);
 }
 
index ec5f95ecf0d3e67f6e13902e1c3d401abd70ef16..6dc7baa334d2d3c4480fa54f21b3854e6ecb64f3 100644 (file)
@@ -243,8 +243,9 @@ element_KRB5_72krb5_pa_data(val, error)
                *error = ENOMEM;
                return(0);
            }
-           xbcopy(rv->PA__DATA->pa__data->qb_forw->qb_data,
-                  retval[i]->contents, retval[i]->length);
+           memcpy(retval[i]->contents,
+                  rv->PA__DATA->pa__data->qb_forw->qb_data,
+                  retval[i]->length);
        }
     }
     retval[i] = 0;
index 838572090444488bc62396e9cf7365bcd7ae3a5b..f58d9367f103e3695771693c7651a3ef6cf7baba 100644 (file)
@@ -36,6 +36,6 @@ strdup(str)
        len = strlen(str) + 1;
        if (!(copy = malloc((u_int)len)))
                return((char *)0);
-       bcopy(str, copy, len);
+       memcpy(copy, str, len);
        return(copy);
 }
index 91a7b65aacea142357a64b211d5709d14a0d3700..ae6c20a3f8367af952b3c424664aad14e2a5b673 100644 (file)
@@ -317,7 +317,7 @@ open_connection(host, fd, Errmsg)
                return(0);
        }
        sin.sin_family = hp->h_addrtype;
-       bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
+       memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length);
        sin.sin_port = sp->s_port;
        s = socket(AF_INET, SOCK_STREAM, 0);