make this 64-bit-safe.

This commit is contained in:
cgd 1995-02-10 18:15:05 +00:00
parent 9fac9bc0af
commit b380b015d1
1 changed files with 3 additions and 5 deletions

View File

@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)ctime.c 5.26 (Berkeley) 2/23/91";*/
static char *rcsid = "$Id: ctime.c,v 1.7 1995/02/01 18:09:39 jtc Exp $";
static char *rcsid = "$Id: ctime.c,v 1.8 1995/02/10 18:15:05 cgd Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@ -219,11 +219,9 @@ detzcode(codep)
const char * const codep;
{
register long result;
register int i;
result = 0;
for (i = 0; i < 4; ++i)
result = (result << 8) | (codep[i] & 0xff);
result = (codep[0] << 24) | ((u_char)codep[1] << 16) |
((u_char)codep[2] << 8) | ((u_char)codep[3] << 0);
return result;
}