Changeset a35b458 in mainline for uspace/lib/c/generic/io/asprintf.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/asprintf.c
r3061bc1 ra35b458 58 58 NULL 59 59 }; 60 60 61 61 return printf_core(fmt, &ps, args); 62 62 } … … 68 68 int ret = vprintf_size(fmt, args); 69 69 va_end(args); 70 70 71 71 return ret; 72 72 } … … 88 88 int ret = vprintf_size(fmt, args2); 89 89 va_end(args2); 90 90 91 91 if (ret > 0) { 92 92 *strp = malloc(STR_BOUNDS(ret) + 1); 93 93 if (*strp == NULL) 94 94 return -1; 95 95 96 96 vsnprintf(*strp, STR_BOUNDS(ret) + 1, fmt, args); 97 97 } 98 98 99 99 return ret; 100 100 } … … 115 115 int ret = vasprintf(strp, fmt, args); 116 116 va_end(args); 117 117 118 118 return ret; 119 119 }
Note:
See TracChangeset
for help on using the changeset viewer.