(sumFile): consider the case that `res' is not longword-aligned.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@842 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-10-12 12:25:02 +00:00
parent 892e3ee1af
commit bb118af7af

View File

@@ -30,10 +30,10 @@ RCSID("$Id$");
*/
static
int
sumFile (const char *name, int len, void *sum_)
sumFile (const char *name, int len, void *res)
{
int32_t *sum = sum_;
int32_t buf[1024*2];
u_int32_t sum[2];
u_int32_t buf[1024*2];
int fd, i;
fd = open (name, 0);
@@ -57,6 +57,7 @@ sumFile (const char *name, int len, void *sum_)
len -= n;
}
close (fd);
memcpy (res, &sum, sizeof(sum));
return 0;
}