[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28a-1187-g9c5c3ea

Jeremy Allison jra at samba.org
Wed May 21 20:03:10 GMT 2008


The branch, v3-0-test has been updated
       via  9c5c3eadf5aaf9821c0ebe1d2bb533eff22aab63 (commit)
      from  d1223dd331841c2482301a9418e3a8607c81a8e9 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit 9c5c3eadf5aaf9821c0ebe1d2bb533eff22aab63
Author: Jeremy Allison <jra at samba.org>
Date:   Wed May 21 13:02:40 2008 -0700

    Don't error out on xflush if there's no buffer.
    Jeremy.

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

Summary of changes:
 source/lib/xfile.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/xfile.c b/source/lib/xfile.c
index d5b1731..9f83483 100644
--- a/source/lib/xfile.c
+++ b/source/lib/xfile.c
@@ -256,6 +256,8 @@ int x_fflush(XFILE *f)
 {
 	int ret;
 
+	if (f->bufused == 0 || !f->buf) return 0;
+
 	if (f->flags & X_FLAG_ERROR) return -1;
 
 	if ((f->open_flags & O_ACCMODE) != O_WRONLY) {
@@ -263,8 +265,6 @@ int x_fflush(XFILE *f)
 		return -1;
 	}
 
-	if (f->bufused == 0 || !f->buf) return 0;
-
 	ret = write(f->fd, f->buf, f->bufused);
 	if (ret == -1) return -1;
 	


-- 
Samba Shared Repository


More information about the samba-cvs mailing list