svn commit: samba r15813 - in branches/SAMBA_4_0/source/torture: .

jelmer at samba.org jelmer at samba.org
Mon May 22 17:12:23 GMT 2006


Author: jelmer
Date: 2006-05-22 17:12:22 +0000 (Mon, 22 May 2006)
New Revision: 15813

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

Log:
Use labs() rather than abs() for 32-bit integers. Caught by the IBM checker.

Modified:
   branches/SAMBA_4_0/source/torture/gentest.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/gentest.c
===================================================================
--- branches/SAMBA_4_0/source/torture/gentest.c	2006-05-22 16:57:14 UTC (rev 15812)
+++ branches/SAMBA_4_0/source/torture/gentest.c	2006-05-22 17:12:22 UTC (rev 15813)
@@ -206,7 +206,7 @@
 static uint_t time_skew(void)
 {
 	uint_t ret;
-	ret = abs(servers[0].cli[0]->transport->negotiate.server_time -
+	ret = labs(servers[0].cli[0]->transport->negotiate.server_time -
 		  servers[1].cli[0]->transport->negotiate.server_time);
 	return ret + 300;
 }
@@ -1036,7 +1036,7 @@
 } while(0)
 
 #define CHECK_TIMES_EQUAL(field) do { \
-	if (abs(parm[0].field - parm[1].field) > time_skew() && \
+	if (labs(parm[0].field - parm[1].field) > time_skew() && \
 	    !ignore_pattern(#field)) { \
 		printf("Mismatch in %s - 0x%x 0x%x\n", #field, \
 		       (int)parm[0].field, (int)parm[1].field); \
@@ -1045,7 +1045,7 @@
 } while(0)
 
 #define CHECK_NTTIMES_EQUAL(field) do { \
-	if (abs(nt_time_to_unix(parm[0].field) - \
+	if (labs(nt_time_to_unix(parm[0].field) - \
 		nt_time_to_unix(parm[1].field)) > time_skew() && \
 	    !ignore_pattern(#field)) { \
 		printf("Mismatch in %s - 0x%x 0x%x\n", #field, \



More information about the samba-cvs mailing list