svn commit: samba r24847 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

obnox at samba.org obnox at samba.org
Fri Aug 31 15:51:07 GMT 2007


Author: obnox
Date: 2007-08-31 15:51:05 +0000 (Fri, 31 Aug 2007)
New Revision: 24847

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24847

Log:
Change standard failure return code of tdb_validate from "-1" to "1".
(This is more safely used with casts from int to uint8, e.g.)

Michael


Modified:
   branches/SAMBA_3_2/source/lib/util_tdb.c
   branches/SAMBA_3_2_0/source/lib/util_tdb.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2/source/lib/util_tdb.c	2007-08-31 15:43:03 UTC (rev 24846)
+++ branches/SAMBA_3_2/source/lib/util_tdb.c	2007-08-31 15:51:05 UTC (rev 24847)
@@ -1013,7 +1013,7 @@
 static int tdb_validate_child(const char *tdb_path,
 			      tdb_validate_data_func validate_fn)
 {
-	int ret = -1;
+	int ret = 1;
 	int num_entries = 0;
 	TDB_CONTEXT *tdb = NULL;
 	struct tdb_validation_status v_status;
@@ -1078,7 +1078,7 @@
 	pid_t child_pid = -1;
 	int child_status = 0;
 	int wait_pid = 0;
-	int ret = -1;
+	int ret = 1;
 
 	DEBUG(5, ("tdb_validate called for tdb '%s'\n", tdb_path));
 

Modified: branches/SAMBA_3_2_0/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/util_tdb.c	2007-08-31 15:43:03 UTC (rev 24846)
+++ branches/SAMBA_3_2_0/source/lib/util_tdb.c	2007-08-31 15:51:05 UTC (rev 24847)
@@ -1013,7 +1013,7 @@
 static int tdb_validate_child(const char *tdb_path,
 			      tdb_validate_data_func validate_fn)
 {
-	int ret = -1;
+	int ret = 1;
 	int num_entries = 0;
 	TDB_CONTEXT *tdb = NULL;
 	struct tdb_validation_status v_status;
@@ -1078,7 +1078,7 @@
 	pid_t child_pid = -1;
 	int child_status = 0;
 	int wait_pid = 0;
-	int ret = -1;
+	int ret = 1;
 
 	DEBUG(5, ("tdb_validate called for tdb '%s'\n", tdb_path));
 



More information about the samba-cvs mailing list