else {
*occupied = 0;
if (insert_new && i < len) {
- memmove(list + i + 1, list + i,
- (len - i) * sizeof(struct notes_merge_pair));
+ MOVE_ARRAY(list + i + 1, list + i, len - i);
memset(list + i, 0, sizeof(struct notes_merge_pair));
}
}
fd = xopen(path, O_WRONLY | O_EXCL | O_CREAT, 0666);
while (size > 0) {
- long ret = write_in_full(fd, buf, size);
+ ssize_t ret = write_in_full(fd, buf, size);
if (ret < 0) {
/* Ignore epipe */
if (errno == EPIPE)
if (!oidcmp(&remote->object.oid, base_oid)) {
/* Already merged; result == local commit */
if (o->verbosity >= 2)
- printf("Already up-to-date!\n");
+ printf("Already up to date!\n");
oidcpy(result_oid, &local->object.oid);
goto found_result;
}
/* write file as blob, and add to partial_tree */
if (stat(path.buf, &st))
die_errno("Failed to stat '%s'", path.buf);
- if (index_path(blob_oid.hash, path.buf, &st, HASH_WRITE_OBJECT))
+ if (index_path(&blob_oid, path.buf, &st, HASH_WRITE_OBJECT))
die("Failed to write blob object from '%s'", path.buf);
if (add_note(partial_tree, &obj_oid, &blob_oid, NULL))
die("Failed to add resolved note '%s' to notes tree",