summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt
diff options
context:
space:
mode:
authorderaadt <>1997-03-30 20:24:47 +0000
committerderaadt <>1997-03-30 20:24:47 +0000
commit2f1e018a2e2601c24d37328ab8b204b6a017ec5f (patch)
tree188b3ed48586b939fd830e6a9f146832ad670554 /src/lib/libc/crypt
parent947071a7bfcc80cf98ec343ed4b1eb033aecba1f (diff)
downloadopenbsd-2f1e018a2e2601c24d37328ab8b204b6a017ec5f.tar.gz
openbsd-2f1e018a2e2601c24d37328ab8b204b6a017ec5f.tar.bz2
openbsd-2f1e018a2e2601c24d37328ab8b204b6a017ec5f.zip
delete the unaligned code
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r--src/lib/libc/crypt/crypt.c12
-rw-r--r--src/lib/libc/crypt/morecrypt.c12
2 files changed, 2 insertions, 22 deletions
diff --git a/src/lib/libc/crypt/crypt.c b/src/lib/libc/crypt/crypt.c
index 922ac5ba32..caa58df486 100644
--- a/src/lib/libc/crypt/crypt.c
+++ b/src/lib/libc/crypt/crypt.c
@@ -50,7 +50,7 @@
50 */ 50 */
51 51
52#if defined(LIBC_SCCS) && !defined(lint) 52#if defined(LIBC_SCCS) && !defined(lint)
53static char rcsid[] = "$OpenBSD: crypt.c,v 1.9 1997/03/27 23:36:53 downsj Exp $"; 53static char rcsid[] = "$OpenBSD: crypt.c,v 1.10 1997/03/30 20:24:46 deraadt Exp $";
54#endif /* LIBC_SCCS and not lint */ 54#endif /* LIBC_SCCS and not lint */
55 55
56#include <sys/types.h> 56#include <sys/types.h>
@@ -572,24 +572,14 @@ des_cipher(in, out, salt, count)
572 572
573 setup_salt(salt); 573 setup_salt(salt);
574 574
575#if 0
576 rawl = ntohl(*((u_int32_t *) in)++);
577 rawr = ntohl(*((u_int32_t *) in));
578#else
579 memcpy(x, in, sizeof x); 575 memcpy(x, in, sizeof x);
580 rawl = ntohl(x[0]); 576 rawl = ntohl(x[0]);
581 rawr = ntohl(x[1]); 577 rawr = ntohl(x[1]);
582#endif
583 retval = do_des(rawl, rawr, &l_out, &r_out, count); 578 retval = do_des(rawl, rawr, &l_out, &r_out, count);
584 579
585#if 0
586 *((u_int32_t *) out)++ = htonl(l_out);
587 *((u_int32_t *) out) = htonl(r_out);
588#else
589 x[0] = htonl(l_out); 580 x[0] = htonl(l_out);
590 x[1] = htonl(r_out); 581 x[1] = htonl(r_out);
591 memcpy(out, x, sizeof x); 582 memcpy(out, x, sizeof x);
592#endif
593 return(retval); 583 return(retval);
594} 584}
595 585
diff --git a/src/lib/libc/crypt/morecrypt.c b/src/lib/libc/crypt/morecrypt.c
index 2bf7d21c38..1178ef6544 100644
--- a/src/lib/libc/crypt/morecrypt.c
+++ b/src/lib/libc/crypt/morecrypt.c
@@ -51,7 +51,7 @@
51 */ 51 */
52 52
53#if defined(LIBC_SCCS) && !defined(lint) 53#if defined(LIBC_SCCS) && !defined(lint)
54static char rcsid[] = "$OpenBSD: morecrypt.c,v 1.7 1996/11/14 05:45:15 etheisen Exp $"; 54static char rcsid[] = "$OpenBSD: morecrypt.c,v 1.8 1997/03/30 20:24:47 deraadt Exp $";
55#endif /* LIBC_SCCS and not lint */ 55#endif /* LIBC_SCCS and not lint */
56 56
57#include <sys/types.h> 57#include <sys/types.h>
@@ -487,24 +487,14 @@ des_cipher(in, out, salt, count)
487 487
488 setup_salt((int32_t)salt); 488 setup_salt((int32_t)salt);
489 489
490#if 0
491 rawl = ntohl(*((u_int32_t *) in)++);
492 rawr = ntohl(*((u_int32_t *) in));
493#else
494 memcpy(x, in, sizeof x); 490 memcpy(x, in, sizeof x);
495 rawl = ntohl(x[0]); 491 rawl = ntohl(x[0]);
496 rawr = ntohl(x[1]); 492 rawr = ntohl(x[1]);
497#endif
498 retval = do_des(rawl, rawr, &l_out, &r_out, count); 493 retval = do_des(rawl, rawr, &l_out, &r_out, count);
499 494
500#if 0
501 *((u_int32_t *) out)++ = htonl(l_out);
502 *((u_int32_t *) out) = htonl(r_out);
503#else
504 x[0] = htonl(l_out); 495 x[0] = htonl(l_out);
505 x[1] = htonl(r_out); 496 x[1] = htonl(r_out);
506 memcpy(out, x, sizeof x); 497 memcpy(out, x, sizeof x);
507#endif
508 return(retval); 498 return(retval);
509} 499}
510 500