Print this page
patch tsoome-feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mv/mv.c
          +++ new/usr/src/cmd/mv/mv.c
↓ open down ↓ 1951 lines elided ↑ open up ↑
1952 1952                                              "%s of %s to %s\n"), cmd,
1953 1953                                              dp->d_name, source, target);
1954 1954                                  }
1955 1955                          }
1956 1956  next:
1957 1957                          if (srcattrfd != -1)
1958 1958                                  (void) close(srcattrfd);
1959 1959                          if (targattrfd != -1)
1960 1960                                  (void) close(targattrfd);
1961 1961                          srcattrfd = targattrfd = -1;
1962      -                        if (res != NULL)
1963      -                                nvlist_free(res);
     1962 +                        nvlist_free(res);
1964 1963                  }
1965 1964          }
1966 1965          /* Copy source file non default extended system attributes to target */
1967 1966          if (target_sa_support && (response != NULL) &&
1968 1967              (fsetattr(targfd, XATTR_VIEW_READWRITE, response)) != 0) {
1969 1968                  ++error;
1970 1969                  (void) fprintf(stderr, gettext("%s: Failed to "
1971 1970                      "copy extended system attributes from "
1972 1971                      "%s to %s\n"), cmd, source, target);
1973 1972          }
1974 1973  out:
1975      -        if (response != NULL)
1976      -                nvlist_free(response);
     1974 +        nvlist_free(response);
1977 1975          close_all();
1978 1976          return (error == 0 ? 0 : 1);
1979 1977  }
1980 1978  
1981 1979  /* Open the source file */
1982 1980  
1983 1981  int
1984 1982  open_source(char  *src)
1985 1983  {
1986 1984          int     error = 0;
↓ open down ↓ 271 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX