mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Kill some dead stores and fix a null pointer deref, found by clang.
This commit is contained in:
		@@ -140,6 +140,8 @@ cmd_command_prompt_callback(void *data, const char *s)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (buf == NULL)
 | 
			
		||||
			return (0);
 | 
			
		||||
		buf[len] = '\0';
 | 
			
		||||
		s = buf;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								layout-set.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								layout-set.c
									
									
									
									
									
								
							@@ -122,10 +122,9 @@ layout_set_even_h(struct window *w)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	/* How many can we fit? */
 | 
			
		||||
	if (w->sx / n < PANE_MINIMUM + 1) {
 | 
			
		||||
	if (w->sx / n < PANE_MINIMUM + 1)
 | 
			
		||||
		width = PANE_MINIMUM + 1;
 | 
			
		||||
		n = UINT_MAX;
 | 
			
		||||
	} else
 | 
			
		||||
	else
 | 
			
		||||
		width = w->sx / n;
 | 
			
		||||
 | 
			
		||||
	/* Free the old root and construct a new. */
 | 
			
		||||
@@ -177,10 +176,9 @@ layout_set_even_v(struct window *w)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	/* How many can we fit? */
 | 
			
		||||
	if (w->sy / n < PANE_MINIMUM + 1) {
 | 
			
		||||
	if (w->sy / n < PANE_MINIMUM + 1)
 | 
			
		||||
		height = PANE_MINIMUM + 1;
 | 
			
		||||
		n = UINT_MAX;
 | 
			
		||||
	} else
 | 
			
		||||
	else
 | 
			
		||||
		height = w->sy / n;
 | 
			
		||||
 | 
			
		||||
	/* Free the old root and construct a new. */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user