mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	remove extra 'isalias' variable (re: 16d5ea9b)
src/cmd/ksh93/bltins/typeset.c: unall(): - There's no need to keep track of whether we're unsetting an alias using a new 'isalias' vaariable, as we can just repeat the check for 'troot==shp->alias_tree'. (cherry picked from commit 68f3ae3acd0d19dd80805049a1c9afc1ae1e75c3)
This commit is contained in:
		
							parent
							
								
									5d50f825e4
								
							
						
					
					
						commit
						b883c7a7f8
					
				
					 1 changed files with 4 additions and 5 deletions
				
			
		|  | @ -1161,13 +1161,11 @@ static int unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp) | |||
| 	register const char *name; | ||||
| 	volatile int r; | ||||
| 	Dt_t	*dp; | ||||
| 	int nflag=0,all=0,isalias=0,isfun,jmpval; | ||||
| 	int nflag=0,all=0,isfun,jmpval; | ||||
| 	struct checkpt buff; | ||||
| 	NOT_USED(argc); | ||||
| 	if(troot==shp->alias_tree) { | ||||
| 		isalias = 1; | ||||
| 	if(troot==shp->alias_tree) | ||||
| 		name = sh_optunalias; | ||||
| 	} | ||||
| 	else | ||||
| 		name = sh_optunset; | ||||
| 	while(r = optget(argv,name)) switch(r) | ||||
|  | @ -1302,7 +1300,8 @@ static int unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp) | |||
| 					nv_delete(np,troottmp,0); | ||||
| 			} | ||||
| 			/* The alias has been unset by call to _nv_unset, remove it from the tree */ | ||||
| 			else if(isalias) { | ||||
| 			else if(troot==shp->alias_tree) | ||||
| 			{ | ||||
| 				if(nv_isattr(np, NV_NOFREE)) | ||||
| 					nv_delete(np,troot,NV_NOFREE); /* The alias is in read-only memory (shtab_aliases) */ | ||||
| 				else | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue