summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-05-22 20:42:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-05-22 20:42:44 +0000
commitbb32043ce53510a0a2f9830106f028566ac4c15d (patch)
tree69e74586994e5287402cbf881178a3ad3e78263f
parentd1716823b403988d32df4bdd5a47cebe3cf824c8 (diff)
remove sprintf() and vsprintf(). nothing in the kernel needs it. if
some module does -- tough -- they can rewrite it using the safer versions.
-rw-r--r--sys/kern/subr_prf.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index aab82260361..6975032902a 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.51 2003/05/21 16:17:37 art Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.52 2003/05/22 20:42:43 deraadt Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
@@ -532,48 +532,6 @@ vprintf(const char *fmt, va_list ap)
return (retval);
}
-__warn_references(sprintf,
- "warning: sprintf() is often misused, please use snprintf()");
-
-/*
- * sprintf: print a message to a buffer
- */
-int
-sprintf(char *buf, const char *fmt, ...)
-{
- int retval;
- va_list ap;
-
- va_start(ap, fmt);
- retval = kprintf(fmt, TOBUFONLY, NULL, buf, ap);
- va_end(ap);
- *(buf + retval) = 0; /* null terminate */
- return(retval);
-}
-
-__warn_references(vsprintf,
- "warning: vsprintf() is often misused, please use vsnprintf()");
-
-/*
- * vsprintf: print a message to the provided buffer [already have a
- * va_list]
- */
-int
-vsprintf(char *buf, const char *fmt, va_list ap)
-{
- int savintr;
- int len;
-
- savintr = consintr; /* disable interrupts */
- consintr = 0;
- len = kprintf(fmt, TOBUFONLY, NULL, buf, ap);
- if (!panicstr)
- logwakeup();
- consintr = savintr; /* reenable interrupts */
- buf[len] = 0;
- return (len);
-}
-
/*
* snprintf: print a message to a buffer
*/