Make the first argument of getbsize a size_t* instead of an int*, as this is what the quantity actually is. Fix an easy const while I'm here.

This commit is contained in:
Mark Murray 2002-10-23 14:18:07 +00:00
parent 06a93bac4f
commit d69d15193c
3 changed files with 5 additions and 4 deletions

View File

@ -227,7 +227,7 @@ __uint32_t
arc4random(void); arc4random(void);
void arc4random_addrandom(unsigned char *dat, int datlen); void arc4random_addrandom(unsigned char *dat, int datlen);
void arc4random_stir(void); void arc4random_stir(void);
char *getbsize(int *, long *); char *getbsize(size_t *, long *);
/* getcap(3) functions */ /* getcap(3) functions */
char *cgetcap(char *, const char *, int); char *cgetcap(char *, const char *, int);
int cgetclose(void); int cgetclose(void);

View File

@ -43,7 +43,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.In stdlib.h .In stdlib.h
.Ft char * .Ft char *
.Fn getbsize "int *headerlenp" "long *blocksizep" .Fn getbsize "size_t *headerlenp" "long *blocksizep"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn getbsize .Fn getbsize

View File

@ -44,12 +44,13 @@ __FBSDID("$FreeBSD$");
char * char *
getbsize(headerlenp, blocksizep) getbsize(headerlenp, blocksizep)
int *headerlenp; size_t *headerlenp;
long *blocksizep; long *blocksizep;
{ {
static char header[20]; static char header[20];
long n, max, mul, blocksize; long n, max, mul, blocksize;
char *ep, *p, *form; char *ep, *p;
const char *form;
#define KB (1024L) #define KB (1024L)
#define MB (1024L * 1024L) #define MB (1024L * 1024L)