Skip to content

Commit 1c8ead9

Browse files
pcloudsgitster
authored andcommitted
vcs-svn: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d2b6afa commit 1c8ead9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

vcs-svn/line_buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ long buffer_tmpfile_prepare_to_read(struct line_buffer *buf)
5353
{
5454
long pos = ftell(buf->infile);
5555
if (pos < 0)
56-
return error("ftell error: %s", strerror(errno));
56+
return error_errno("ftell error");
5757
if (fseek(buf->infile, 0, SEEK_SET))
58-
return error("seek error: %s", strerror(errno));
58+
return error_errno("seek error");
5959
return pos;
6060
}
6161

vcs-svn/sliding_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static int input_error(struct line_buffer *file)
1212
{
1313
if (!buffer_ferror(file))
1414
return error("delta preimage ends early");
15-
return error("cannot read delta preimage: %s", strerror(errno));
15+
return error_errno("cannot read delta preimage");
1616
}
1717

1818
static int skip_or_whine(struct line_buffer *file, off_t gap)

vcs-svn/svndiff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ static int write_strbuf(struct strbuf *sb, FILE *out)
6464
{
6565
if (fwrite(sb->buf, 1, sb->len, out) == sb->len) /* Success. */
6666
return 0;
67-
return error("cannot write delta postimage: %s", strerror(errno));
67+
return error_errno("cannot write delta postimage");
6868
}
6969

7070
static int error_short_read(struct line_buffer *input)
7171
{
7272
if (buffer_ferror(input))
73-
return error("error reading delta: %s", strerror(errno));
73+
return error_errno("error reading delta");
7474
return error("invalid delta: unexpected end of file");
7575
}
7676

vcs-svn/svndump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,15 @@ static void init(int report_fd)
501501
int svndump_init(const char *filename)
502502
{
503503
if (buffer_init(&input, filename))
504-
return error("cannot open %s: %s", filename ? filename : "NULL", strerror(errno));
504+
return error_errno("cannot open %s", filename ? filename : "NULL");
505505
init(REPORT_FILENO);
506506
return 0;
507507
}
508508

509509
int svndump_init_fd(int in_fd, int back_fd)
510510
{
511511
if(buffer_fdinit(&input, xdup(in_fd)))
512-
return error("cannot open fd %d: %s", in_fd, strerror(errno));
512+
return error_errno("cannot open fd %d", in_fd);
513513
init(xdup(back_fd));
514514
return 0;
515515
}

0 commit comments

Comments
 (0)