src/printf.c

changeset 1065
6eb7b54975ee
parent 926
8fdd8d78c14b
equal deleted inserted replaced
1064:f3b04cd60776 1065:6eb7b54975ee
67 va_end(ap2); 67 va_end(ap2);
68 return (int) wfc(buf, 1, ret, stream); 68 return (int) wfc(buf, 1, ret, stream);
69 } else { 69 } else {
70 int len = ret + 1; 70 int len = ret + 1;
71 char *newbuf = malloc(len); 71 char *newbuf = malloc(len);
72 if (!newbuf) { 72 if (!newbuf) { // LCOV_EXCL_START
73 va_end(ap2); 73 va_end(ap2);
74 return -1; 74 return -1;
75 } 75 } // LCOV_EXCL_STOP
76 76
77 ret = vsnprintf(newbuf, len, fmt, ap2); 77 ret = vsnprintf(newbuf, len, fmt, ap2);
78 va_end(ap2); 78 va_end(ap2);
79 if (ret > 0) { 79 if (ret > 0) {
80 ret = (int) wfc(newbuf, 1, ret, stream); 80 ret = (int) wfc(newbuf, 1, ret, stream);

mercurial