Got rid of a superfluous call to f_name() in receive_acl().
authorWayne Davison <wayned@samba.org>
Sat, 29 Apr 2006 09:14:31 +0000 (09:14 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 29 Apr 2006 09:14:31 +0000 (09:14 +0000)
acls.diff

index 2a4939f84afa25014c39901e4c9aaa3a07fdf529..1eea3d8824ee12f14a7ab477396dcc99b535e88d 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -38,7 +38,7 @@ TODO items:
  popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
 --- old/acls.c
 +++ new/acls.c
-@@ -0,0 +1,1310 @@
+@@ -0,0 +1,1308 @@
 +/*
 + * Handle passing Access Control Lists between systems.
 + *
@@ -901,12 +901,10 @@ TODO items:
 +void receive_acl(struct file_struct *file, int f)
 +{
 +      SMB_ACL_TYPE_T type;
-+      char *fname;
 +
 +      if (S_ISLNK(file->mode))
 +              return;
 +
-+      fname = f_name(file, NULL);
 +      type = SMB_ACL_TYPE_ACCESS;
 +      do {
 +              char tag;
@@ -918,18 +916,18 @@ TODO items:
 +              if (tag == 'A' || tag == 'a') {
 +                      if (type != SMB_ACL_TYPE_ACCESS) {
 +                              rprintf(FERROR, "receive_acl %s: duplicate access ACL\n",
-+                                      fname);
++                                      f_name(file, NULL));
 +                              exit_cleanup(RERR_STREAMIO);
 +                      }
 +              } else if (tag == 'D' || tag == 'd') {
 +                      if (type == SMB_ACL_TYPE_ACCESS) {
 +                              rprintf(FERROR, "receive_acl %s: expecting access ACL; got default\n",
-+                                      fname);
++                                      f_name(file, NULL));
 +                              exit_cleanup(RERR_STREAMIO);
 +                      }
 +              } else {
 +                      rprintf(FERROR, "receive_acl %s: unknown ACL type tag: %c\n",
-+                              fname, tag);
++                              f_name(file, NULL), tag);
 +                      exit_cleanup(RERR_STREAMIO);
 +              }
 +              if (tag == 'A' || tag == 'D') {
@@ -948,7 +946,7 @@ TODO items:
 +                      rsync_acl_list *racl_list = rsync_acl_lists(type);
 +                      if ((size_t) index >= racl_list->count) {
 +                              rprintf(FERROR, "receive_acl %s: %s ACL index %d out of range\n",
-+                                      fname,
++                                      f_name(file, NULL),
 +                                      str_acl_type(type),
 +                                      index);
 +                              exit_cleanup(RERR_STREAMIO);
@@ -4961,7 +4959,7 @@ TODO items:
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1068,6 +1080,24 @@ int parse_arguments(int *argc, const cha
+@@ -1070,6 +1082,24 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -4986,7 +4984,7 @@ TODO items:
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1510,6 +1540,10 @@ void server_options(char **args,int *arg
+@@ -1504,6 +1534,10 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';