setenv is prefered according to POSIX. Also allows staticly allocated strings.
Saves 200 bytes when stripped. 432 without.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
struct blobmsg_list_node *var;
struct blob_attr *cur;
char **argv;
- char *ld_preload;
int argc = 1; /* NULL terminated */
int rem, _stdin;
bool seccomp = !in->trace && !in->has_jail && in->seccomp;
if (seccomp)
setenv("SECCOMP_FILE", in->seccomp, 1);
- if (setlbf && asprintf(&ld_preload, "LD_PRELOAD=/lib/libsetlbf.so") > 0)
- putenv(ld_preload);
+ if (setlbf)
+ setenv("LD_PRELOAD", "/lib/libsetlbf.so", 1);
blobmsg_list_for_each(&in->limits, var)
instance_limits(blobmsg_name(var->data), blobmsg_data(var->data));