Use off_t for file sizes, size_t for buffer sizes.
This commit is contained in:
+2
-2
@@ -376,7 +376,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
memset(&sb, 0, sizeof(sb));
|
||||
rc = stat(size_file, &sb);
|
||||
if (0 == rc) {
|
||||
opts->size = (size_t) (sb.st_size);
|
||||
opts->size = (off_t) (sb.st_size);
|
||||
} else {
|
||||
/*@-mustfreefresh@ *//* see above */
|
||||
fprintf(stderr, "%s: %s %s: %s\n",
|
||||
@@ -420,7 +420,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
opts->rate_limit = pv_getnum_size(optarg);
|
||||
break;
|
||||
case 'B':
|
||||
opts->buffer_size = pv_getnum_size(optarg);
|
||||
opts->buffer_size = (size_t) pv_getnum_size(optarg);
|
||||
opts->no_splice = true;
|
||||
break;
|
||||
case 'C':
|
||||
|
||||
+2
-2
@@ -36,9 +36,9 @@ struct remote_msg {
|
||||
bool bytes; /* bytes transferred flag */
|
||||
bool bufpercent; /* transfer buffer percentage flag */
|
||||
unsigned int lastwritten; /* last-written bytes count */
|
||||
size_t rate_limit; /* rate limit, in bytes per second */
|
||||
off_t rate_limit; /* rate limit, in bytes per second */
|
||||
size_t buffer_size; /* buffer size, in bytes (0=default) */
|
||||
size_t size; /* total size of data */
|
||||
off_t size; /* total size of data */
|
||||
double interval; /* interval between updates */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
|
||||
Reference in New Issue
Block a user