Type consistency corrections - use booleans for boolean operations, use size_t for byte counts.

This commit is contained in:
Andrew Wood
2023-09-12 23:42:23 +01:00
parent 052c182278
commit 8a2ddac50e
11 changed files with 97 additions and 91 deletions
+10 -4
View File
@@ -9,6 +9,12 @@
#ifndef _OPTIONS_H
#define _OPTIONS_H 1
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -36,13 +42,13 @@ struct opts_s { /* structure describing run-time options */
bool linemode; /* count lines instead of bytes */
bool null_terminated_lines; /* lines are null-terminated */
bool no_display; /* do nothing other than pipe data */
unsigned long long rate_limit; /* rate limit, in bytes per second */
unsigned long long buffer_size;/* buffer size, in bytes (0=default) */
size_t rate_limit; /* rate limit, in bytes per second */
size_t buffer_size; /* buffer size, in bytes (0=default) */
unsigned int remote; /* PID of pv to update settings of */
unsigned long long size; /* total size of data */
size_t size; /* total size of data */
bool no_splice; /* flag set if never to use splice */
unsigned int skip_errors; /* skip read errors counter */
unsigned long long error_skip_block; /* skip block size, 0 for adaptive */
size_t error_skip_block; /* skip block size, 0 for adaptive */
bool stop_at_size; /* set if we stop at "size" bytes */
bool sync_after_write; /* set if we sync after every write */
bool direct_io; /* set if O_DIRECT is to be used */