Added some defines for the various exclude-function arg literals.
[rsync/rsync.git] / batch.c
diff --git a/batch.c b/batch.c
index 6ef89e8..d3f6523 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -264,7 +264,7 @@ int read_batch_flist_file(char *buff, int len)
        return bytes_read;
 }
 
-unsigned char read_batch_flags()
+unsigned char read_batch_flags(void)
 {
        int flags;
 
@@ -405,14 +405,14 @@ void write_batch_csum_info(int *flist_entry, int flist_count,
                           struct sum_struct *s)
 {
        size_t i;
-       size_t int_count;
+       int int_count;
        extern int csum_length;
 
        fdb_open = 1;
 
        write_batch_csums_file(flist_entry, sizeof(int));
-       int_count = s->count;
-       write_batch_csums_file(&int_count, int_count);
+       int_count = s ? (int) s->count : 0;
+       write_batch_csums_file(&int_count, sizeof int_count);
        
        if (s) {
                for (i = 0; i < s->count; i++) {