]> git.proxmox.com Git - libgit2.git/commitdiff
Use git_oid_cpy() instead of memcpy()
authorPierre-Olivier Latour <pol@mac.com>
Wed, 15 Apr 2015 22:27:56 +0000 (15:27 -0700)
committerPierre-Olivier Latour <pol@mac.com>
Wed, 15 Apr 2015 22:27:56 +0000 (15:27 -0700)
src/diff.c

index f1bc28fd919fc014a88b4b15c9063e7e75140a56..20f8f74c572fb85dce15e0f4a9b1135199ee8bc5 100644 (file)
@@ -621,7 +621,7 @@ int git_diff__oid_for_entry(
                git_index *idx;
 
                if (!(error = git_repository_index__weakptr(&idx, diff->repo))) {
-                       memcpy(&entry.id, out, sizeof(entry.id));
+                       git_oid_cpy(&entry.id, out);
                        error = git_index_add(idx, &entry);
                }
        }