void addenv(char *var, char *val) {
char *s=malloc(strlen(var)+1+strlen(val)+1);
void addenv(char *var, char *val) {
char *s=malloc(strlen(var)+1+strlen(val)+1);
- sprintf(s, "%s=%s", var, val);
- newenviron[i++]=s;
+ exit(1);
+ }
+ else {
+ sprintf(s, "%s=%s", var, val);
+ newenviron[i++]=s;
+ }