xref: /original-bsd/sys/libkern/skpc.c (revision 37071c60)
1 /*-
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)skpc.c	8.1 (Berkeley) 06/10/93
8  */
9 
10 #include <libkern/libkern.h>
11 
12 int
13 skpc(mask0, size, cp0)
14 	int mask0;
15 	int size;
16 	char *cp0;
17 {
18 	register u_char *cp, *end, mask;
19 
20 	mask = mask0;
21 	cp = (u_char *)cp0;
22 	for (end = &cp[size]; cp < end && *cp == mask; ++cp);
23 	return (end - cp);
24 }
25