real_path: set errno when max number of symlinks is exceeded
[gitweb.git] / sequencer.c
index a61fe76f98f0a5805bb75e9b5c40c39b4b750498..30b10ba143959bf2618872427f730a9f0e30d369 100644 (file)
@@ -248,7 +248,7 @@ static int write_message(const void *buf, size_t len, const char *filename,
        }
        if (append_eol && write(msg_fd, "\n", 1) < 0) {
                rollback_lock_file(&msg_file);
-               return error_errno(_("could not write eol to '%s"), filename);
+               return error_errno(_("could not write eol to '%s'"), filename);
        }
        if (commit_lock_file(&msg_file) < 0) {
                rollback_lock_file(&msg_file);
@@ -629,7 +629,7 @@ static const char *todo_command_strings[] = {
 
 static const char *command_to_string(const enum todo_command command)
 {
-       if (command < ARRAY_SIZE(todo_command_strings))
+       if ((size_t)command < ARRAY_SIZE(todo_command_strings))
                return todo_command_strings[command];
        die("Unknown command: %d", command);
 }
@@ -658,7 +658,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
                unborn = get_sha1("HEAD", head);
                if (unborn)
                        hashcpy(head, EMPTY_TREE_SHA1_BIN);
-               if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD", 0))
+               if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD", 0, 0))
                        return error_dirty_index(opts);
        }
        discard_cache();
@@ -1312,7 +1312,7 @@ int sequencer_continue(struct replay_opts *opts)
                if (res)
                        goto release_todo_list;
        }
-       if (index_differs_from("HEAD", 0)) {
+       if (index_differs_from("HEAD", 0, 0)) {
                res = error_dirty_index(opts);
                goto release_todo_list;
        }