xalloc_die ();
}
+#ifdef lint
+extern void
+dest_info_free (struct cp_options *x)
+{
+ if (x->dest_info)
+ hash_free (x->dest_info);
+ x->dest_info = NULL;
+}
+#endif
+
/* Initialize the hash table implementing a set of F_triple entries
corresponding to source files listed on the command line. */
extern void
xalloc_die ();
}
+#ifdef lint
+extern void
+src_info_free (struct cp_options *x)
+{
+ if (x->src_info)
+ hash_free (x->src_info);
+ x->src_info = NULL;
+}
+#endif
+
/* When effecting a move (e.g., for mv(1)), and given the name DST_NAME
of the destination and a corresponding stat buffer, DST_SB, return
true if the logical 'move' operation should _not_ proceed.
bool recurse, const struct cp_options *x);
void dest_info_init (struct cp_options *);
+void dest_info_free (struct cp_options *);
void src_info_init (struct cp_options *);
+void src_info_free (struct cp_options *);
void cp_options_default (struct cp_options *);
bool chown_failure_ok (struct cp_options const *) _GL_ATTRIBUTE_PURE;
/* Reset the hash structure in the global variable 'htab' to
contain no entries. */
+#ifdef lint
extern void
forget_all (void)
{
hash_free (src_to_dest);
}
+#endif
free (dst_name);
}
+
+#ifdef lint
+ dest_info_free (x);
+ src_info_free (x);
+#endif
}
else /* !target_directory */
{
if (! install_file_in_dir (file[i], target_directory, &x,
i == 0 && mkdir_and_install))
exit_status = EXIT_FAILURE;
+#ifdef lint
+ dest_info_free (&x);
+#endif
}
}
ok &= do_link (file[i], destdir_fd, dest_base, dest, -1);
free (dest);
}
+
+#ifdef lint
+ if (dest_set)
+ hash_free (dest_set);
+ dest_set = NULL;
+#endif
}
else
ok = do_link (file[0], AT_FDCWD, file[1], file[1], link_errno);
x.last_file = i + 1 == n_files;
ok &= movefile (file[i], target_directory, true, &x);
}
+
+#ifdef lint
+ dest_info_free (&x);
+#endif
}
else
{
return true;
}
if (follow_mode == Follow_descriptor && !found_watchable_file)
- return false;
+ {
+# ifdef lint
+ hash_free (wd_to_name);
+# endif
+ return false;
+ }
prev_fspec = &(f[n_files - 1]);
&& hash_get_n_entries (wd_to_name) == 0)
{
error (0, 0, _("no files remaining"));
+# ifdef lint
+ hash_free (wd_to_name);
+# endif
return false;
}