make this 64-bit-safe.

This commit is contained in:
cgd 1995-02-10 18:15:05 +00:00
parent 9fac9bc0af
commit b380b015d1

View File

@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)ctime.c 5.26 (Berkeley) 2/23/91";*/ /*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 */ #endif /* LIBC_SCCS and not lint */
/* /*
@ -219,11 +219,9 @@ detzcode(codep)
const char * const codep; const char * const codep;
{ {
register long result; register long result;
register int i;
result = 0; result = (codep[0] << 24) | ((u_char)codep[1] << 16) |
for (i = 0; i < 4; ++i) ((u_char)codep[2] << 8) | ((u_char)codep[3] << 0);
result = (result << 8) | (codep[i] & 0xff);
return result; return result;
} }