changeset 201:84611183c8c3

target-utils/libprintf: minor polish
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 19 Dec 2013 08:26:14 +0000
parents 2847b6cbd915
children b26b7459bd44
files target-utils/libprintf/doprnt.c target-utils/libprintf/sprintf_putchar.c
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/libprintf/doprnt.c	Thu Dec 19 08:15:47 2013 +0000
+++ b/target-utils/libprintf/doprnt.c	Thu Dec 19 08:26:14 2013 +0000
@@ -9,14 +9,11 @@
 #define	ARG() \
 	_ulong = flags&LONGINT ? va_arg(argp, long) : va_arg(argp, int);
 
-#define	BUF	256
+#define	BUF	12
 
 #define	todigit(c)	((c) - '0')
 #define	tochar(n)	((n) + '0')
 
-/* have to deal with the negative buffer count kludge */
-#define	NEGATIVE_COUNT_KLUDGE
-
 #define	LONGINT		0x01		/* long integer */
 #define	LONGDBL		0x02		/* long double; unimplemented */
 #define	SHORTINT	0x04		/* short integer */
--- a/target-utils/libprintf/sprintf_putchar.c	Thu Dec 19 08:15:47 2013 +0000
+++ b/target-utils/libprintf/sprintf_putchar.c	Thu Dec 19 08:26:14 2013 +0000
@@ -3,6 +3,5 @@
 	int ch;
 	char **pp;
 {
-	**pp = ch;
-	(*pp)++;
+	*(*pp)++ = ch;
 }