aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ccan/list/test/run-check-corrupt.c2
-rw-r--r--libc/include/stdio.h1
-rw-r--r--libc/stdio/Makefile.inc2
-rw-r--r--libc/stdio/vsprintf.c19
4 files changed, 2 insertions, 22 deletions
diff --git a/ccan/list/test/run-check-corrupt.c b/ccan/list/test/run-check-corrupt.c
index 5dd9f9c..f4c20b5 100644
--- a/ccan/list/test/run-check-corrupt.c
+++ b/ccan/list/test/run-check-corrupt.c
@@ -17,7 +17,7 @@ static int my_fprintf(FILE *stream, const char *format, ...)
va_list ap;
int ret;
va_start(ap, format);
- ret = vsprintf(printf_buffer, format, ap);
+ ret = vsnprintf(printf_buffer, sizeof(printf_buffer), format, ap);
va_end(ap);
return ret;
}
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 6dd82c3..787c06b 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -44,7 +44,6 @@ int printf(const char *format, ...) __attribute__((format (printf, 1, 2)));
int fprintf(FILE *stream, const char *format, ...) __attribute__((format (printf, 2, 3)));
int snprintf(char *str, size_t size, const char *format, ...) __attribute__((format (printf, 3, 4)));
int vfprintf(FILE *stream, const char *format, va_list);
-int vsprintf(char *str, const char *format, va_list);
int vsnprintf(char *str, size_t size, const char *format, va_list);
void setbuf(FILE *stream, char *buf);
int setvbuf(FILE *stream, char *buf, int mode , size_t size);
diff --git a/libc/stdio/Makefile.inc b/libc/stdio/Makefile.inc
index 025ee01..7c3cb08 100644
--- a/libc/stdio/Makefile.inc
+++ b/libc/stdio/Makefile.inc
@@ -13,7 +13,7 @@
SUBDIRS += $(LIBCDIR)/stdio
-STDIO_OBJS = fscanf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \
+STDIO_OBJS = fscanf.o vfprintf.o vsnprintf.o fprintf.o \
setvbuf.o fputc.o puts.o fputs.o putchar.o scanf.o \
stdchnls.o vfscanf.o vsscanf.o fileno.o snprintf.o
diff --git a/libc/stdio/vsprintf.c b/libc/stdio/vsprintf.c
deleted file mode 100644
index 0dfd737..0000000
--- a/libc/stdio/vsprintf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation
- * All rights reserved.
- * This program and the accompanying materials
- * are made available under the terms of the BSD License
- * which accompanies this distribution, and is available at
- * http://www.opensource.org/licenses/bsd-license.php
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *****************************************************************************/
-
-#include "stdio.h"
-
-int
-vsprintf(char *buffer, const char *format, va_list arg)
-{
- return vsnprintf(buffer, 0x7fffffff, format, arg);
-}