Merge branch 'rs/obsd-getcwd-workaround' into next
[gitweb.git] / read-cache.c
index 2121b6e7bba5f310825e0b1f2eccd524cc8658ce..acfb028f480b5545aa82d5c0533fe8bdfc581dfd 100644 (file)
@@ -515,9 +515,8 @@ int remove_index_entry_at(struct index_state *istate, int pos)
        istate->cache_nr--;
        if (pos >= istate->cache_nr)
                return 0;
-       memmove(istate->cache + pos,
-               istate->cache + pos + 1,
-               (istate->cache_nr - pos) * sizeof(struct cache_entry *));
+       MOVE_ARRAY(istate->cache + pos, istate->cache + pos + 1,
+                  istate->cache_nr - pos);
        return 1;
 }