typo
[unix-history] / usr / src / lib / libc / string / bcmp.c
CommitLineData
dba1d438
KM
1/*
2 * Copyright (c) 1987 Regents of the University of California.
acca4551
KB
3 * All rights reserved.
4 *
019bea33 5 * %sccs.include.redist.c%
dba1d438
KM
6 */
7
8#if defined(LIBC_SCCS) && !defined(lint)
5d873e24 9static char sccsid[] = "@(#)bcmp.c 5.5 (Berkeley) %G%";
acca4551 10#endif /* LIBC_SCCS and not lint */
dba1d438 11
80acdbfd
KB
12#include <string.h>
13
dba1d438
KM
14/*
15 * bcmp -- vax cmpc3 instruction
16 */
17bcmp(b1, b2, length)
5d873e24 18 register void *b1, *b2;
80acdbfd 19 register size_t length;
dba1d438
KM
20{
21
22 if (length == 0)
80acdbfd 23 return(0);
dba1d438
KM
24 do
25 if (*b1++ != *b2++)
26 break;
27 while (--length);
28 return(length);
29}