mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	Simplify some code in GUnixOutputStream
This commit is contained in:
		@@ -339,19 +339,18 @@ g_unix_output_stream_write (GOutputStream  *stream,
 | 
				
			|||||||
  GUnixOutputStream *unix_stream;
 | 
					  GUnixOutputStream *unix_stream;
 | 
				
			||||||
  gssize res = -1;
 | 
					  gssize res = -1;
 | 
				
			||||||
  GPollFD poll_fds[2];
 | 
					  GPollFD poll_fds[2];
 | 
				
			||||||
  int nfds;
 | 
					  int nfds = 0;
 | 
				
			||||||
  int poll_ret;
 | 
					  int poll_ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  unix_stream = G_UNIX_OUTPUT_STREAM (stream);
 | 
					  unix_stream = G_UNIX_OUTPUT_STREAM (stream);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  poll_fds[0].fd = unix_stream->priv->fd;
 | 
					  poll_fds[0].fd = unix_stream->priv->fd;
 | 
				
			||||||
  poll_fds[0].events = G_IO_OUT;
 | 
					  poll_fds[0].events = G_IO_OUT;
 | 
				
			||||||
 | 
					  nfds++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (unix_stream->priv->is_pipe_or_socket &&
 | 
					  if (unix_stream->priv->is_pipe_or_socket &&
 | 
				
			||||||
      g_cancellable_make_pollfd (cancellable, &poll_fds[1]))
 | 
					      g_cancellable_make_pollfd (cancellable, &poll_fds[1]))
 | 
				
			||||||
    nfds = 2;
 | 
					    nfds++;
 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    nfds = 1;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  while (1)
 | 
					  while (1)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user