Skip to content

Commit 8e111e4

Browse files
committed
Merge branch 'rs/help-unknown-ref-does-not-return'
Code cleanup. * rs/help-unknown-ref-does-not-return: help: make help_unknown_ref() NORETURN
2 parents 3ff6af7 + 80e3658 commit 8e111e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

help.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,8 @@ static struct string_list guess_refs(const char *ref)
774774
return similar_refs;
775775
}
776776

777-
void help_unknown_ref(const char *ref, const char *cmd, const char *error)
777+
NORETURN void help_unknown_ref(const char *ref, const char *cmd,
778+
const char *error)
778779
{
779780
int i;
780781
struct string_list suggested_refs = guess_refs(ref);

help.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void list_commands(unsigned int colopts, struct cmdnames *main_cmds, struct cmdn
4343
* call this to die(), when it is suspected that the user mistyped a
4444
* ref to the command, to give suggested "correct" refs.
4545
*/
46-
void help_unknown_ref(const char *ref, const char *cmd, const char *error);
46+
NORETURN void help_unknown_ref(const char *ref, const char *cmd, const char *error);
4747

4848
static inline void list_config_item(struct string_list *list,
4949
const char *prefix,

0 commit comments

Comments
 (0)