Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5977
b: refs/heads/master
c: 8032230
h: refs/heads/master
i:
  5975: 588b83b
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Aug 24, 2005
1 parent 50e6721 commit 06cb1ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acd3bd82c08d1a399760605706a86821148243d9
refs/heads/master: 8032230694ec56c168a1404c67a54d281536cbed
5 changes: 4 additions & 1 deletion trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
int qualifier; /* 'h', 'l', or 'L' for integer fields */
/* 'z' support added 23/7/1999 S.H. */
/* 'z' changed to 'Z' --davidm 1/25/99 */
/* 't' added for ptrdiff_t */

/* Reject out-of-range values early */
if (unlikely((int) size < 0)) {
Expand Down Expand Up @@ -339,7 +340,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
/* get the conversion qualifier */
qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' ||
*fmt =='Z' || *fmt == 'z') {
*fmt =='Z' || *fmt == 'z' || *fmt == 't') {
qualifier = *fmt;
++fmt;
if (qualifier == 'l' && *fmt == 'l') {
Expand Down Expand Up @@ -467,6 +468,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
num = (signed long) num;
} else if (qualifier == 'Z' || qualifier == 'z') {
num = va_arg(args, size_t);
} else if (qualifier == 't') {
num = va_arg(args, ptrdiff_t);
} else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags & SIGN)
Expand Down

0 comments on commit 06cb1ca

Please sign in to comment.