summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 22:17:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 22:17:31 +0000
commit33b456e6d0c1e4de25630107835a8aa6de0a4a03 (patch)
tree29a152d748ce5792bc8387f43f562085dba9b0be
parenteb1959df7bbc953457995a65b2b43e40dee2d7d6 (diff)
locc() is dead, spotted by miod
-rw-r--r--sys/lib/libkern/libkern.h3
-rw-r--r--sys/lib/libkern/locc.c46
2 files changed, 1 insertions, 48 deletions
diff --git a/sys/lib/libkern/libkern.h b/sys/lib/libkern/libkern.h
index 8b326f6f377..a357f0ece48 100644
--- a/sys/lib/libkern/libkern.h
+++ b/sys/lib/libkern/libkern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libkern.h,v 1.23 2007/05/04 22:14:37 deraadt Exp $ */
+/* $OpenBSD: libkern.h,v 1.24 2007/05/04 22:17:30 deraadt Exp $ */
/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */
/*-
@@ -153,7 +153,6 @@ void __assert(const char *, const char *, int, const char *)
int bcmp(const void *, const void *, size_t);
void bzero(void *, size_t);
int ffs(int);
-int locc(int, char *, u_int);
void *memchr(const void *, int, size_t);
int memcmp(const void *, const void *, size_t);
u_long random(void);
diff --git a/sys/lib/libkern/locc.c b/sys/lib/libkern/locc.c
deleted file mode 100644
index c879b7ea89f..00000000000
--- a/sys/lib/libkern/locc.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $OpenBSD: locc.c,v 1.5 2004/08/07 00:38:32 deraadt Exp $ */
-/* $NetBSD: locc.c,v 1.2 1994/10/26 06:42:29 cgd Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_subr.c 7.13 (Berkeley) 6/28/90
- */
-
-#include <sys/types.h>
-#include <lib/libkern/libkern.h>
-
-int
-locc(int mask, char *cp, u_int size)
-{
- char *end = &cp[size];
-
- while (cp < end && *cp != mask)
- cp++;
- return (end - cp);
-}