Print this page
10134 mv needs smatch fixes

@@ -30,10 +30,14 @@
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 
 /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
  * University Copyright- Copyright (c) 1982, 1986, 1988
  * The Regents of the University of California
  * All Rights Reserved
  *
  * University Acknowledgment- Portions of this document are derived from

@@ -1937,11 +1941,10 @@
                          * Gets non default extended system attributes from the
                          * attribute file to copy to the target. The target has
                          * the defaults set when its created and thus  no need
                          * to copy the defaults.
                          */
-                        if (dp->d_name != NULL) {
                                 res = sysattr_list(cmd, srcattrfd, dp->d_name);
                                 if (res == NULL)
                                         goto next;
 
                         /*

@@ -1955,11 +1958,11 @@
                                             "Failed to copy extended system "
                                             "attributes from attribute file "
                                             "%s of %s to %s\n"), cmd,
                                             dp->d_name, source, target);
                                 }
-                        }
+
 next:
                         if (srcattrfd != -1)
                                 (void) close(srcattrfd);
                         if (targattrfd != -1)
                                 (void) close(targattrfd);