=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/env/env.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** src/usr.bin/env/env.c 2006/05/28 05:29:54 1.12 --- src/usr.bin/env/env.c 2009/03/01 17:02:25 1.13 *************** *** 1,4 **** ! /* $OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $ */ /* * Copyright (c) 1988, 1993, 1994 --- 1,4 ---- ! /* $OpenBSD: env.c,v 1.13 2009/03/01 17:02:25 millert Exp $ */ /* * Copyright (c) 1988, 1993, 1994 *************** *** 37,43 **** #ifndef lint /*static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94";*/ ! static char rcsid[] = "$OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $"; #endif /* not lint */ #include --- 37,43 ---- #ifndef lint /*static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94";*/ ! static char rcsid[] = "$OpenBSD: env.c,v 1.13 2009/03/01 17:02:25 millert Exp $"; #endif /* not lint */ #include *************** *** 73,83 **** argc -= optind; argv += optind; ! for (; *argv && (p = strchr(*argv, '=')); ++argv) ! if (setenv(*argv, ++p, 1) == -1) { /* reuse 126, it matches the problem most */ exit(126); } if (*argv) { /* --- 73,85 ---- argc -= optind; argv += optind; ! for (; *argv && (p = strchr(*argv, '=')); ++argv) { ! *p++ = '\0'; ! if (setenv(*argv, p, 1) == -1) { /* reuse 126, it matches the problem most */ exit(126); } + } if (*argv) { /*