libbb: make "COMMON_BUFSIZE = 1024 bytes, the buffer will be malloced" work

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-04-21 21:03:51 +02:00
parent df70a43af2
commit f56fb5eb11
2 changed files with 6 additions and 5 deletions

View File

@ -55,14 +55,14 @@ char bb_common_bufsiz1[COMMON_BUFSIZE] ALIGNED(sizeof(long long));
# ifndef setup_common_bufsiz
/*
* It is not a "((void)0)" macro. It means we have to provide this function.
* It is not defined as a dummy macro.
* It means we have to provide this function.
*/
char* bb_common_bufsiz1;
char* setup_common_bufsiz(void)
void setup_common_bufsiz(void)
{
if (!bb_common_bufsiz1)
bb_common_bufsiz1 = xzalloc(COMMON_BUFSIZE);
return bb_common_bufsiz1;
}
# else
# ifndef bb_common_bufsiz1