PATCH: unsigned/signed

andreas moroder claudiamoroder at st-ulrich.suedtirol.net
Sat Feb 16 06:12:42 GMT 2002


Hello,

here two patches against HEAD for situations where unsigned and signed ints 
was mixed.

Please tell me the reason , if this patches are not applied .

Bye
Andreas


--- utils/smbcacls.c	Fri Feb  8 19:08:40 2002
+++ utils/smbcacls.and	Sat Feb 16 14:34:35 2002
@@ -407,7 +407,7 @@
 static void sec_desc_print(FILE *f, SEC_DESC *sd)
 {
 	fstring sidstr;
-	int i;
+	uint32 i;
 
 	printf("REVISION:%d\n", sd->revision);
 
@@ -553,14 +553,14 @@
 
 static void sort_acl(SEC_ACL *the_acl)
 {
-	int i;
+	uint32 i;
 	if (!the_acl) return;
 
 	qsort(the_acl->ace, the_acl->num_aces, sizeof(the_acl->ace[0]), QSORT_CAST 
ace_compare);
 
 	for (i=1;i<the_acl->num_aces;) {
 		if (sec_ace_equal(&the_acl->ace[i-1], &the_acl->ace[i])) {
-			int j;
+			uint32 j;
 			for (j=i; j<the_acl->num_aces-1; j++) {
 				the_acl->ace[j] = the_acl->ace[j+1];
 			}
@@ -579,7 +579,7 @@
 {
 	int fnum;
 	SEC_DESC *sd, *old;
-	int i, j;
+	uint32 i, j;
 	size_t sd_size;
 	int result = EXIT_OK;
 
@@ -616,7 +616,7 @@
 			for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
 				if (sec_ace_equal(&sd->dacl->ace[i],
 						  &old->dacl->ace[j])) {
-					int k;
+					uint32 k;
 					for (k=j; k<old->dacl->num_aces-1;k++) {
 						old->dacl->ace[k] = old->dacl->ace[k+1];
 					}








--- tdb/tdb.c	Fri Feb  8 19:08:32 2002
+++ tdb/tdb.and	Sat Feb 16 14:46:08 2002
@@ -458,9 +458,9 @@

 void tdb_dump_all(TDB_CONTEXT *tdb)
 {
-	int i;
+	u32 i;
 	for (i=0;i<tdb->header.hash_size;i++) {
-		tdb_dump_chain(tdb, i);
+		tdb_dump_chain(tdb, (int) i);
 	}
 	printf("freelist:\n");
 	tdb_dump_chain(tdb, -1);




More information about the samba-technical mailing list