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