WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Remove unused implementation of vsprintf(

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Remove unused implementation of vsprintf().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 06:00:26 -0800
Delivery-date: Tue, 30 Jan 2007 06:01:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170105362 0
# Node ID effa38a30a5c8a53c1568157ce6f664d127b773e
# Parent  e7ceed4ebcd9a60a9828121c68a15c7c62f9a8cb
Remove unused implementation of vsprintf().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/vsprintf.c |   29 -----------------------------
 xen/include/xen/lib.h |    3 +--
 2 files changed, 1 insertion(+), 31 deletions(-)

diff -r e7ceed4ebcd9 -r effa38a30a5c xen/common/vsprintf.c
--- a/xen/common/vsprintf.c     Mon Jan 29 17:01:53 2007 +0000
+++ b/xen/common/vsprintf.c     Mon Jan 29 21:16:02 2007 +0000
@@ -182,15 +182,6 @@ static char *number(
         tmp[i++]='0';
     else while (num != 0)
         tmp[i++] = digits[do_div(num,base)];
-#if 0
-    else 
-    {
-        /* XXX KAF: force unsigned mod and div. */
-        unsigned long long num2=(unsigned long long)num;
-        unsigned int base2=(unsigned int)base;
-        while (num2 != 0) { tmp[i++] = digits[num2%base2]; num2 /= base2; }
-    }
-#endif
     if (i > precision)
         precision = i;
     size -= precision;
@@ -571,26 +562,6 @@ EXPORT_SYMBOL(scnprintf);
 EXPORT_SYMBOL(scnprintf);
 
 /**
- * vsprintf - Format a string and place it in a buffer
- * @buf: The buffer to place the result into
- * @fmt: The format string to use
- * @args: Arguments for the format string
- *
- * The function returns the number of characters written
- * into @buf. Use vsnprintf or vscnprintf in order to avoid
- * buffer overflows.
- *
- * Call this function if you are already dealing with a va_list.
- * You probably want sprintf instead.
- */
-int vsprintf(char *buf, const char *fmt, va_list args)
-{
-    return vsnprintf(buf, INT_MAX, fmt, args);
-}
-
-EXPORT_SYMBOL(vsprintf);
-
-/**
  * sprintf - Format a string and place it in a buffer
  * @buf: The buffer to place the result into
  * @fmt: The format string to use
diff -r e7ceed4ebcd9 -r effa38a30a5c xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     Mon Jan 29 17:01:53 2007 +0000
+++ b/xen/include/xen/lib.h     Mon Jan 29 21:16:02 2007 +0000
@@ -62,8 +62,7 @@ extern int printk_ratelimit(void);
 /* vsprintf.c */
 extern int sprintf(char * buf, const char * fmt, ...)
     __attribute__ ((format (printf, 2, 3)));
-extern int vsprintf(char *buf, const char *, va_list)
-    __attribute__ ((format (printf, 2, 0)));
+#define vsprintf __xen_has_no_vsprintf__
 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
     __attribute__ ((format (printf, 3, 4)));
 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Remove unused implementation of vsprintf()., Xen patchbot-unstable <=