mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	putenv can be char *.
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| /* $Id: cmd-string.c,v 1.14 2009-05-04 19:12:37 nicm Exp $ */ | /* $Id: cmd-string.c,v 1.15 2009-05-15 12:58:56 nicm Exp $ */ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> |  * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> | ||||||
| @@ -63,7 +63,7 @@ cmd_string_parse(const char *s, struct cmd_list **cmdlist, char **cause) | |||||||
| 	if ((t = strchr(s, ' ')) == NULL && (t = strchr(s, '\t')) == NULL) | 	if ((t = strchr(s, ' ')) == NULL && (t = strchr(s, '\t')) == NULL) | ||||||
| 		t = strchr(s, '\0'); | 		t = strchr(s, '\0'); | ||||||
| 	if ((u = strchr(s, '=')) != NULL && u < t) { | 	if ((u = strchr(s, '=')) != NULL && u < t) { | ||||||
| 		if (putenv(s) != 0) { | 		if (putenv((char *) s) != 0) { | ||||||
| 			xasprintf(cause, "assignment failed: %s", s); | 			xasprintf(cause, "assignment failed: %s", s); | ||||||
| 			return (-1); | 			return (-1); | ||||||
| 		} | 		} | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								window.c
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| /* $Id: window.c,v 1.75 2009-05-14 07:58:38 nicm Exp $ */ | /* $Id: window.c,v 1.76 2009-05-15 12:58:56 nicm Exp $ */ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> |  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> | ||||||
| @@ -590,7 +590,7 @@ window_pane_spawn(struct window_pane *wp, | |||||||
| 		if (chdir(wp->cwd) != 0) | 		if (chdir(wp->cwd) != 0) | ||||||
| 			chdir("/"); | 			chdir("/"); | ||||||
| 		for (envq = envp; *envq != NULL; envq++) { | 		for (envq = envp; *envq != NULL; envq++) { | ||||||
| 			if (putenv(*envq) != 0) | 			if (putenv((char *) *envq) != 0) | ||||||
| 				fatal("putenv failed"); | 				fatal("putenv failed"); | ||||||
| 		} | 		} | ||||||
| 		sigreset(); | 		sigreset(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nicholas Marriott
					Nicholas Marriott