Skip to content

Commit 6a2d3f5

Browse files
drafnelgitster
authored andcommitted
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c8f373a commit 6a2d3f5

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

builtin-mailsplit.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,6 @@ static int is_from_line(const char *line, int len)
4545

4646
static struct strbuf buf = STRBUF_INIT;
4747

48-
/* We cannot use fgets() because our lines can contain NULs */
49-
int read_line_with_nul(char *buf, int size, FILE *in)
50-
{
51-
int len = 0, c;
52-
53-
for (;;) {
54-
c = getc(in);
55-
if (c == EOF)
56-
break;
57-
buf[len++] = c;
58-
if (c == '\n' || len + 1 >= size)
59-
break;
60-
}
61-
buf[len] = '\0';
62-
63-
return len;
64-
}
65-
6648
/* Called with the first line (potentially partial)
6749
* already in buf[] -- normally that should begin with
6850
* the Unix "From " line. Write it into the specified

builtin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ extern const char git_more_info_string[];
1313
extern void list_common_cmds_help(void);
1414
extern const char *help_unknown_cmd(const char *cmd);
1515
extern void prune_packed_objects(int);
16-
extern int read_line_with_nul(char *buf, int size, FILE *file);
1716
extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
1817
struct strbuf *out);
1918
extern int commit_tree(const char *msg, unsigned char *tree,

0 commit comments

Comments
 (0)