Got rid of two compiler warnings.
authorWayne Davison <wayned@samba.org>
Fri, 13 May 2005 06:19:43 +0000 (06:19 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 13 May 2005 06:19:43 +0000 (06:19 +0000)
xattrs.diff

index 2fdd46a..ebb902c 100644 (file)
@@ -358,8 +358,8 @@ After applying this patch, run these commands for a successful build:
  dit(bf(-o, --owner)) This option causes rsync to set the owner of the
  destination file to be the same as the source file.  On most systems,
  only the super-user can set file ownership.  By default, the preservation
---- orig/xattr.c       2005-05-12 23:18:33
-+++ xattr.c    2005-05-12 23:18:33
+--- orig/xattr.c       2005-05-13 06:10:34
++++ xattr.c    2005-05-13 06:10:34
 @@ -0,0 +1,546 @@
 +/* Extended Attribute support for rsync */
 +/* Copyright (C) 2004 Red Hat, Inc */
@@ -597,7 +597,7 @@ After applying this patch, run these commands for a successful build:
 +
 +BOOL make_xattr(const struct file_struct *file, const char *fname)
 +{
-+      if (!preserve_xattrs)
++      if (!preserve_xattrs || !file)
 +              return True;
 +
 +      rsync_xal_get(fname, &curr_rsync_xal);
@@ -657,7 +657,7 @@ After applying this patch, run these commands for a successful build:
 +{
 +      ssize_t index;
 +
-+      if (!preserve_xattrs)
++      if (!preserve_xattrs || !file)
 +              return;
 +
 +      if (f == -1) {