diff options
author | Søren Schmidt <sos@FreeBSD.org> | 2002-03-04 20:50:16 +0000 |
---|---|---|
committer | Søren Schmidt <sos@FreeBSD.org> | 2002-03-04 20:50:16 +0000 |
commit | 17744fcb98352da4c9cdf1f3526af601c98fcc7f (patch) | |
tree | e1757b07bf6d67622379d0652c789f875ba93a93 /usr.sbin/burncd | |
parent | 20bee7c8decd436e451621f334e7e7d715fc8a4f (diff) | |
download | src-17744fcb98352da4c9cdf1f3526af601c98fcc7f.tar.gz src-17744fcb98352da4c9cdf1f3526af601c98fcc7f.zip |
Notes
Diffstat (limited to 'usr.sbin/burncd')
-rw-r--r-- | usr.sbin/burncd/burncd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c index daea1a48cedc..5b74029b0442 100644 --- a/usr.sbin/burncd/burncd.c +++ b/usr.sbin/burncd/burncd.c @@ -28,7 +28,6 @@ * $FreeBSD$ */ -#include <arpa/inet.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> @@ -42,6 +41,7 @@ #include <sys/cdio.h> #include <sys/cdrio.h> #include <sys/param.h> +#include <arpa/inet.h> #define BLOCKS 16 @@ -486,8 +486,6 @@ write_file(struct track_info *track_info) track_info->file_name, filesize); } size = 0; - if (filesize == 0) - filesize++; /* cheat, avoid divide by zero */ while ((count = read(track_info->file, buf, MIN((track_info->file_size - size), @@ -512,7 +510,7 @@ write_file(struct track_info *track_info) int pct; fprintf(stderr, "written this track %d KB", size/1024); - if (track_info->file != STDIN_FILENO) { + if (track_info->file != STDIN_FILENO && filesize) { pct = (size / 1024) * 100 / filesize; fprintf(stderr, " (%d%%)", pct); } |