diff options
author | Theodore Tso <tytso@mit.edu> | 1995-04-21 03:10:41 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-04-21 03:10:41 +0000 |
commit | 69e5511fe7fe37d20da05c3ea64138d5ad4fa807 (patch) | |
tree | 7e090660e47224645054cafa9776e133a8c73e69 /src/lib/krb5/krb/copy_cksum.c | |
parent | 6cfda9ba4533630d273331b6017f2a5f5e5dbad4 (diff) | |
download | krb5-69e5511fe7fe37d20da05c3ea64138d5ad4fa807.zip krb5-69e5511fe7fe37d20da05c3ea64138d5ad4fa807.tar.gz krb5-69e5511fe7fe37d20da05c3ea64138d5ad4fa807.tar.bz2 |
Unless HAVE_C_STRUCTURE_ASSIGNMENT is defined, use memcpy to copy
structures around, instead of using structure assignments. (Which
aren't guaranteed to work on some broken compilers.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5423 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/copy_cksum.c')
-rw-r--r-- | src/lib/krb5/krb/copy_cksum.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/copy_cksum.c b/src/lib/krb5/krb/copy_cksum.c index 4d8d3ef..5a9a893 100644 --- a/src/lib/krb5/krb/copy_cksum.c +++ b/src/lib/krb5/krb/copy_cksum.c @@ -36,7 +36,11 @@ krb5_copy_checksum(context, ckfrom, ckto) if (!(tempto = (krb5_checksum *)malloc(sizeof(*tempto)))) return ENOMEM; +#ifdef HAVE_C_STRUCTURE_ASSIGNMENT *tempto = *ckfrom; +#else + memcpy(tempto, ckfrom, sizeof(krb5_checksum)); +#endif if (!(tempto->contents = (krb5_octet *)malloc(tempto->length))) { |