[kvm-unit-tests PATCH 20/32] lib: fix *printf return value

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

 



From: Peter Feiner <pfeiner@xxxxxxxxxx>

Was returning the number of characters printed plus, incorrectly, one
for the null terminator.

Signed-off-by: Peter Feiner <pfeiner@xxxxxxxxxx>
Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
---
 lib/printf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/printf.c b/lib/printf.c
index cecbeadc4440..aca2920887c1 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -221,7 +221,6 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va)
 	}
     }
     *s.buffer = 0;
-    ++s.added;
     return s.added;
 }
 
-- 
2.12.2.816.g2cccc81164-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux