# HG changeset patch # User Paul Boddie # Date 1618698346 -7200 # Node ID 4672fb694b0c3017582f15067c222d853e2013d8 # Parent febfa7a229b36bcce95d6af1a601af111a3368ce Added missing pragma and fixed transfer length types. diff -r febfa7a229b3 -r 4672fb694b0c libfsclient/include/fsclient/file.h --- a/libfsclient/include/fsclient/file.h Sun Apr 18 00:24:18 2021 +0200 +++ b/libfsclient/include/fsclient/file.h Sun Apr 18 00:25:46 2021 +0200 @@ -19,6 +19,8 @@ * Boston, MA 02110-1301, USA */ +#pragma once + #include #include @@ -94,8 +96,8 @@ /* Client data transfer functions. */ -void file_data_read(file_t *file, char *buf, size_t to_transfer); -void file_data_write(file_t *file, char *buf, size_t to_transfer); +void file_data_read(file_t *file, char *buf, offset_t to_transfer); +void file_data_write(file_t *file, char *buf, offset_t to_transfer); diff -r febfa7a229b3 -r 4672fb694b0c libfsclient/lib/src/file.cc --- a/libfsclient/lib/src/file.cc Sun Apr 18 00:24:18 2021 +0200 +++ b/libfsclient/lib/src/file.cc Sun Apr 18 00:25:46 2021 +0200 @@ -331,7 +331,7 @@ /* Copy data to the given buffer from the current data position, updating the position. */ -void file_data_read(file_t *file, char *buf, size_t to_transfer) +void file_data_read(file_t *file, char *buf, offset_t to_transfer) { memcpy(buf, file_data_current(file), to_transfer); @@ -343,7 +343,7 @@ /* Copy data from the given buffer to the current data position, updating the position and the extent of populated data if this was exceeded. */ -void file_data_write(file_t *file, char *buf, size_t to_transfer) +void file_data_write(file_t *file, char *buf, offset_t to_transfer) { memcpy(file_data_current(file), buf, to_transfer);