aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-repeat.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-05-16 20:14:22 +0200
committerMattias Andrée <maandree@kth.se>2017-05-16 20:14:22 +0200
commit0f03cc378e6ce48f17a20e409f93bfc11345a6ed (patch)
treef4768c6fe96e1ac2a9c5833dee897924300d4a45 /src/blind-repeat.c
parentAdd blind-tempral-mean (diff)
downloadblind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.gz
blind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.bz2
blind-0f03cc378e6ce48f17a20e409f93bfc11345a6ed.tar.xz
Fix errors and warnings and make the code cleaner
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-repeat.c')
-rw-r--r--src/blind-repeat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/blind-repeat.c b/src/blind-repeat.c
index 17164e7..b7763eb 100644
--- a/src/blind-repeat.c
+++ b/src/blind-repeat.c
@@ -1,8 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#include "stream.h"
-#include "util.h"
-
-#include <string.h>
+#include "common.h"
USAGE("(count | 'inf') file")
@@ -14,8 +11,8 @@ static int
repeat_regular_file(void)
{
while (inf || count--) {
- fadvise_sequential(stream.fd, stream.headlen, 0);
- elseek(stream.fd, stream.headlen, SEEK_SET, stream.file);
+ fadvise_sequential(stream.fd, (off_t)(stream.headlen), 0);
+ elseek(stream.fd, (off_t)(stream.headlen), SEEK_SET, stream.file);
if (esend_stream(&stream, STDOUT_FILENO, NULL))
return -1;
}