+/* Initializes 'dst' with the contents of 'src', compensating for moving it
+ * around in memory. The effect is that, if 'src' was the head of a list, now
+ * 'dst' is the head of a list containing the same elements. */
+void
+list_move(struct list *dst, struct list *src)
+{
+ if (!list_is_empty(src)) {
+ *dst = *src;
+ list_moved(dst);
+ } else {
+ list_init(dst);
+ }
+}
+