[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Thu Feb 10 09:01:01 MST 2011


The branch, master has been updated
       via  831974a s3: Slightly simplify winbind_write_sock
       via  d7d3672 s3: Fix some nonempty blank lines
      from  d02b5cd replace: Add missing eval to m4 script

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 831974a762b890982e17bc641253ebaf8df4444d
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Feb 10 14:59:39 2011 +0100

    s3: Slightly simplify winbind_write_sock
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Thu Feb 10 17:00:46 CET 2011 on sn-devel-104

commit d7d36724d3120167caf487bda863fc350b27bfa7
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Feb 10 11:00:18 2011 +0100

    s3: Fix some nonempty blank lines

-----------------------------------------------------------------------

Summary of changes:
 lib/addns/dnserr.h   |    4 ++--
 nsswitch/wb_common.c |   30 ++++++++++++++----------------
 2 files changed, 16 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/addns/dnserr.h b/lib/addns/dnserr.h
index 9e049ac..8638a2d 100644
--- a/lib/addns/dnserr.h
+++ b/lib/addns/dnserr.h
@@ -1,6 +1,6 @@
 /*
   Error codes for Linux DNS client library implementation
-  
+
   Copyright (C) 2006 Krishna Ganugapati <krishnag at centeris.com>
   Copyright (C) 2006 Gerald Carter <jerry at samba.org>
 
@@ -28,7 +28,7 @@
 
 /* The Splint code analysis tool (http://www.splint.org.) doesn't 
    like immediate structures. */
-   
+
 #ifdef _SPLINT_
 #undef HAVE_IMMEDIATE_STRUCTURES
 #endif
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index 9a3788a..ccc5142 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -403,31 +403,29 @@ static int winbind_write_sock(void *buffer, int count, int recursing,
 
 		/* Write should be OK if fd not available for reading */
 
-		if (!FD_ISSET(winbindd_fd, &r_fds)) {
+		if (FD_ISSET(winbindd_fd, &r_fds)) {
 
-			/* Do the write */
+			/* Pipe has closed on remote end */
 
-			result = write(winbindd_fd,
-				       (char *)buffer + nwritten,
-				       count - nwritten);
+			winbind_close_sock();
+			goto restart;
+		}
 
-			if ((result == -1) || (result == 0)) {
+		/* Do the write */
 
-				/* Write failed */
+		result = write(winbindd_fd,
+			       (char *)buffer + nwritten,
+			       count - nwritten);
 
-				winbind_close_sock();
-				return -1;
-			}
-
-			nwritten += result;
+		if ((result == -1) || (result == 0)) {
 
-		} else {
-
-			/* Pipe has closed on remote end */
+			/* Write failed */
 
 			winbind_close_sock();
-			goto restart;
+			return -1;
 		}
+
+		nwritten += result;
 	}
 
 	return nwritten;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list