mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	loop: initialize some variables
Just in case the read fails.
This commit is contained in:
		
							parent
							
								
									d81fc9bcb4
								
							
						
					
					
						commit
						f26c642055
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -453,7 +453,7 @@ error_exit:
 | 
			
		|||
static void source_event_func(struct spa_source *source)
 | 
			
		||||
{
 | 
			
		||||
	struct source_impl *impl = SPA_CONTAINER_OF(source, struct source_impl, source);
 | 
			
		||||
	uint64_t count;
 | 
			
		||||
	uint64_t count = 0;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	if ((res = spa_system_eventfd_read(impl->impl->system, source->fd, &count)) < 0)
 | 
			
		||||
| 
						 | 
				
			
			@ -516,7 +516,7 @@ static int loop_signal_event(void *object, struct spa_source *source)
 | 
			
		|||
static void source_timer_func(struct spa_source *source)
 | 
			
		||||
{
 | 
			
		||||
	struct source_impl *impl = SPA_CONTAINER_OF(source, struct source_impl, source);
 | 
			
		||||
	uint64_t expirations;
 | 
			
		||||
	uint64_t expirations = 0;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	if (SPA_UNLIKELY((res = spa_system_timerfd_read(impl->impl->system,
 | 
			
		||||
| 
						 | 
				
			
			@ -596,7 +596,7 @@ loop_update_timer(void *object, struct spa_source *source,
 | 
			
		|||
static void source_signal_func(struct spa_source *source)
 | 
			
		||||
{
 | 
			
		||||
	struct source_impl *impl = SPA_CONTAINER_OF(source, struct source_impl, source);
 | 
			
		||||
	int res, signal_number;
 | 
			
		||||
	int res, signal_number = 0;
 | 
			
		||||
 | 
			
		||||
	if ((res = spa_system_signalfd_read(impl->impl->system, source->fd, &signal_number)) < 0)
 | 
			
		||||
		spa_log_warn(impl->impl->log, NAME " %p: failed to read signal fd %d: %s",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue