Addressed more issues raised by splint, and corrected some type confusion between off_t and size_t / ssize_t.

This commit is contained in:
Andrew Wood
2023-09-14 22:19:49 +01:00
parent e696b737e3
commit 252213fbc2
8 changed files with 152 additions and 71 deletions
+1 -1
View File
@@ -341,7 +341,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
opts->no_splice = true;
break;
case 'A':
opts->lastwritten = pv_getnum_ui(optarg);
opts->lastwritten = (size_t) pv_getnum_ui(optarg);
numopts++;
opts->no_splice = true;
break;
+1 -1
View File
@@ -35,7 +35,7 @@ struct remote_msg {
bool average_rate; /* average rate counter flag */
bool bytes; /* bytes transferred flag */
bool bufpercent; /* transfer buffer percentage flag */
unsigned int lastwritten; /* last-written bytes count */
size_t lastwritten; /* last-written bytes count */
off_t rate_limit; /* rate limit, in bytes per second */
size_t buffer_size; /* buffer size, in bytes (0=default) */
off_t size; /* total size of data */