[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue Mar 5 06:01:05 MST 2013


The branch, master has been updated
       via  68698b4 tdb: Slightly simplify tdb_expand_file
      from  70e1b61 tsocket_bsd: Attempt to increase the SO_SNDBUF if we get EMSGSIZE in sendto()

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


- Log -----------------------------------------------------------------
commit 68698b4e64831d2fdf762b5f8577ff404f10a3cb
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 4 13:06:05 2013 +0100

    tdb: Slightly simplify tdb_expand_file
    
    The "else" keywords are not necessary here, we return in the preceding
    if clause
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Mar  5 14:00:47 CET 2013 on sn-devel-104

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

Summary of changes:
 lib/tdb/common/io.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/io.c b/lib/tdb/common/io.c
index 0563635..b9caffb 100644
--- a/lib/tdb/common/io.c
+++ b/lib/tdb/common/io.c
@@ -328,12 +328,14 @@ static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t ad
 				"returned 0 twice: giving up!\n"));
 			errno = ENOSPC;
 			return -1;
-		} else if (written == -1) {
+		}
+		if (written == -1) {
 			TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file write of "
 				 "%d bytes failed (%s)\n", (int)n,
 				 strerror(errno)));
 			return -1;
-		} else if (written != n) {
+		}
+		if (written != n) {
 			TDB_LOG((tdb, TDB_DEBUG_WARNING, "expand_file: wrote "
 				 "only %d of %d bytes - retrying\n", (int)written,
 				 (int)n));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list