projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
woops, we needed that function
[oweals/busybox.git]
/
libbb
/
bb_asprintf.c
1
/*
2
Copyright (C) 2002 Vladimir Oleynik <dzo@simtreas.ru>
3
*/
4
5
#include <stdlib.h>
6
#include <stdio.h>
7
#include <stdarg.h>
8
#include "libbb.h"
9
10
void bb_xasprintf(char **string_ptr, const char *format, ...)
11
{
12
va_list p;
13
int r;
14
15
va_start(p, format);
16
r = vasprintf(string_ptr, format, p);
17
va_end(p);
18
19
if (r < 0) {
20
bb_perror_msg_and_die("bb_xasprintf");
21
}
22
}