[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] common/vsprintf: fix signed->unsigned error, causing glacial performance



commit ddd48f0ea099621ef1e891f634b938dda76a5bba
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Nov 12 17:20:34 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 12 17:20:34 2013 +0100

    common/vsprintf: fix signed->unsigned error, causing glacial performance
    
    The original patch for
    
      c/s 67a3542c5bc356e6452d8305991617c875f87de4
      "common/vsprintf: Refactor string() out of vsnprintf()"
    
    specifically used signed integers, identical to the code copied out of 
vsprintf.
    
    When committed, these had changed to unsigned integers, which causes a
    functional change.  This causes glacial boot performance and an excessive
    quantity of spaces printed to the serial console, as we loop to the upper
    bound of a 32bit integer.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/common/vsprintf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c
index e8f45eb..43dc392 100644
--- a/xen/common/vsprintf.c
+++ b/xen/common/vsprintf.c
@@ -239,7 +239,7 @@ static char *number(
 static char *string(char *str, char *end, const char *s,
                     int field_width, int precision, int flags)
 {
-    unsigned int i, len = strnlen(s, precision);
+    int i, len = strnlen(s, precision);
 
     if (!(flags & LEFT)) {
         while (len < field_width--) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.