Some bf(...) tweaks.
[rsync/rsync.git] / util.c
diff --git a/util.c b/util.c
index 540fdf5..32dd591 100644 (file)
--- a/util.c
+++ b/util.c
@@ -145,8 +145,10 @@ int set_modtime(char *fname, time_t modtime, mode_t mode)
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
 # ifdef HAVE_LUTIMES
-               if (S_ISLNK(mode))
-                       return lutimes(fname, t);
+               if (S_ISLNK(mode)) {
+                       lutimes(fname, t);
+                       return 0; /* ignore errors */
+               }
 # endif
                return utimes(fname, t);
 #elif defined HAVE_UTIMBUF
@@ -864,7 +866,7 @@ char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth,
 /* Like chdir(), but it keeps track of the current directory (in the
  * global "curr_dir"), and ensures that the path size doesn't overflow.
  * Also cleans the path using the clean_fname() function. */
-int push_dir(char *dir, int set_path_only)
+int push_dir(const char *dir, int set_path_only)
 {
        static int initialised;
        unsigned int len;
@@ -911,7 +913,7 @@ int push_dir(char *dir, int set_path_only)
  * Reverse a push_dir() call.  You must pass in an absolute path
  * that was copied from a prior value of "curr_dir".
  **/
-int pop_dir(char *dir)
+int pop_dir(const char *dir)
 {
        if (chdir(dir))
                return 0;