patch: typo's and gcc warnings

Paul Slootman paul at debian.org
Wed Mar 12 23:34:58 EST 2003


Two patches:
one to correct the spelling of permissions (in comments, but such typos
disturb me as well), and
one to cast inode and dev to unsigned long before comparing, to prevent
gcc giving a warning "comparison between signed and unsigned".


Paul Slootman
-------------- next part --------------
diff -ru orig/rsync-2.5.6/generator.c rsync-2.5.6/generator.c
--- orig/rsync-2.5.6/generator.c	2002-08-29 16:44:55.000000000 +0200
+++ rsync-2.5.6/generator.c	2003-03-07 12:06:57.000000000 +0100
@@ -241,7 +241,7 @@
 	    !preserve_perms && 
 	    (S_ISDIR(st.st_mode) == S_ISDIR(file->mode))) {
 		/* if the file exists already and we aren't perserving
-                   presmissions then act as though the remote end sent
+                   permissions then act as though the remote end sent
                    us the file permissions we already have */
 		file->mode = (file->mode & _S_IFMT) | (st.st_mode & ~_S_IFMT);
 	}
diff -ru orig/rsync-2.5.6/receiver.c rsync-2.5.6/receiver.c
--- orig/rsync-2.5.6/receiver.c	2003-01-21 00:32:17.000000000 +0100
+++ rsync-2.5.6/receiver.c	2003-03-10 16:28:10.000000000 +0100
@@ -396,8 +396,8 @@
 		}
 
 		if (fd1 != -1 && !preserve_perms) {
-			/* if the file exists already and we aren't perserving
-			   presmissions then act as though the remote end sent
+			/* if the file exists already and we aren't preserving
+			   permissions then act as though the remote end sent
 			   us the file permissions we already have */
 			file->mode = st.st_mode;
 		}
-------------- next part --------------
diff -ru orig/rsync-2.5.6/receiver.c rsync-2.5.6/receiver.c
--- orig/rsync-2.5.6/receiver.c	2003-01-21 00:32:17.000000000 +0100
+++ rsync-2.5.6/receiver.c	2003-03-10 16:28:10.000000000 +0100
@@ -55,8 +55,8 @@
 	if (link_stat(f_name(flist->files[j]), &st)) return 1;
 
 	for (i=0;i<dlist_len;i++) {
-		if (st.st_ino == delete_list[i].inode &&
-		    st.st_dev == delete_list[i].dev)
+		if (st.st_ino == (unsigned long)delete_list[i].inode &&
+		    st.st_dev == (unsigned long)delete_list[i].dev)
 			return 1;
 	}
 


More information about the rsync mailing list