mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Using off_t to pass a block size is obvious overkill.
The size_t type is better suited for that, particularly because the "blksize" argument is to be passed to malloc() and read(). On 64-bit archs it's more to a style issue, but the good style of coding in C is also important.
This commit is contained in:
parent
e3765043a8
commit
6e4b0a55f7
1 changed files with 2 additions and 2 deletions
|
|
@ -252,7 +252,7 @@ static int guniquefd(char *, char **);
|
|||
static void lostconn(int);
|
||||
static void sigquit(int);
|
||||
static int receive_data(FILE *, FILE *);
|
||||
static int send_data(FILE *, FILE *, off_t, off_t, int);
|
||||
static int send_data(FILE *, FILE *, size_t, off_t, int);
|
||||
static struct passwd *
|
||||
sgetpwnam(char *);
|
||||
static char *sgetsave(char *);
|
||||
|
|
@ -2005,7 +2005,7 @@ pdata_err:
|
|||
* NB: Form isn't handled.
|
||||
*/
|
||||
static int
|
||||
send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
|
||||
send_data(FILE *instr, FILE *outstr, size_t blksize, off_t filesize, int isreg)
|
||||
{
|
||||
int c, cp, filefd, netfd;
|
||||
char *buf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue