From d824cbba02a4061400a0e382f9bd241fbbff34f0 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sat, 27 Jun 2009 17:58:46 +0200 Subject: Convert existing die(..., strerror(errno)) to die_errno() Change calls to die(..., strerror(errno)) to use the new die_errno(). In the process, also make slight style adjustments: at least state _something_ about the function that failed (instead of just printing the pathname), and put paths in single quotes. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- pkt-line.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkt-line.c') diff --git a/pkt-line.c b/pkt-line.c index f5d00863a..b691abebd 100644 --- a/pkt-line.c +++ b/pkt-line.c @@ -28,7 +28,7 @@ ssize_t safe_write(int fd, const void *buf, ssize_t n) } if (!ret) die("write error (disk full?)"); - die("write error (%s)", strerror(errno)); + die_errno("write error"); } return nn; } @@ -67,7 +67,7 @@ static void safe_read(int fd, void *buffer, unsigned size) { ssize_t ret = read_in_full(fd, buffer, size); if (ret < 0) - die("read error (%s)", strerror(errno)); + die_errno("read error"); else if (ret < size) die("The remote end hung up unexpectedly"); } -- cgit v1.2.1