Skip to content

Commit 800531a

Browse files
committed
check-ignore: the name of the character is NUL, not NULL
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 239222f commit 800531a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builtin/check-ignore.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ static const char * const check_ignore_usage[] = {
1212
NULL
1313
};
1414

15-
static int null_term_line;
15+
static int nul_term_line;
1616

1717
static const struct option check_ignore_options[] = {
1818
OPT__QUIET(&quiet, N_("suppress progress reporting")),
1919
OPT__VERBOSE(&verbose, N_("be verbose")),
2020
OPT_GROUP(""),
2121
OPT_BOOLEAN(0, "stdin", &stdin_paths,
2222
N_("read file names from stdin")),
23-
OPT_BOOLEAN('z', NULL, &null_term_line,
24-
N_("input paths are terminated by a null character")),
23+
OPT_BOOLEAN('z', NULL, &nul_term_line,
24+
N_("input paths are terminated by a NUL character")),
2525
OPT_END()
2626
};
2727

2828
static void output_exclude(const char *path, struct exclude *exclude)
2929
{
3030
char *bang = exclude->flags & EXC_FLAG_NEGATIVE ? "!" : "";
3131
char *slash = exclude->flags & EXC_FLAG_MUSTBEDIR ? "/" : "";
32-
if (!null_term_line) {
32+
if (!nul_term_line) {
3333
if (!verbose) {
3434
write_name_quoted(path, stdout, '\n');
3535
} else {
@@ -111,7 +111,7 @@ static int check_ignore_stdin_paths(const char *prefix)
111111
struct strbuf buf, nbuf;
112112
char **pathspec = NULL;
113113
size_t nr = 0, alloc = 0;
114-
int line_termination = null_term_line ? 0 : '\n';
114+
int line_termination = nul_term_line ? 0 : '\n';
115115
int num_ignored;
116116

117117
strbuf_init(&buf, 0);
@@ -150,7 +150,7 @@ int cmd_check_ignore(int argc, const char **argv, const char *prefix)
150150
if (argc > 0)
151151
die(_("cannot specify pathnames with --stdin"));
152152
} else {
153-
if (null_term_line)
153+
if (nul_term_line)
154154
die(_("-z only makes sense with --stdin"));
155155
if (argc == 0)
156156
die(_("no path specified"));

0 commit comments

Comments
 (0)