#define BUFSIZE_IN_PLACE_MAX 32
struct {
int small_flag;
int size;
char *buf;
}
return small_flag ? (char *)&buf : buf;
When small_flag is true, char values are put in place of buf, not where buf points to.
For small_flag == true case, I have the constant value for the maximum length BUFSIZE_IN_PLACE_MAX.