From d69d15193c1a720ffa8269058ff216dccea734c5 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Wed, 23 Oct 2002 14:18:07 +0000 Subject: [PATCH] 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. --- include/stdlib.h | 2 +- lib/libc/gen/getbsize.3 | 2 +- lib/libc/gen/getbsize.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index b8dddedb6f30..f1beaaa4138d 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -227,7 +227,7 @@ __uint32_t arc4random(void); void arc4random_addrandom(unsigned char *dat, int datlen); void arc4random_stir(void); -char *getbsize(int *, long *); +char *getbsize(size_t *, long *); /* getcap(3) functions */ char *cgetcap(char *, const char *, int); int cgetclose(void); diff --git a/lib/libc/gen/getbsize.3 b/lib/libc/gen/getbsize.3 index cbf48630f94b..f91f8ba35cc4 100644 --- a/lib/libc/gen/getbsize.3 +++ b/lib/libc/gen/getbsize.3 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .In stdlib.h .Ft char * -.Fn getbsize "int *headerlenp" "long *blocksizep" +.Fn getbsize "size_t *headerlenp" "long *blocksizep" .Sh DESCRIPTION The .Fn getbsize diff --git a/lib/libc/gen/getbsize.c b/lib/libc/gen/getbsize.c index b50b14e90008..11e5ef751b6a 100644 --- a/lib/libc/gen/getbsize.c +++ b/lib/libc/gen/getbsize.c @@ -44,12 +44,13 @@ __FBSDID("$FreeBSD$"); char * getbsize(headerlenp, blocksizep) - int *headerlenp; + size_t *headerlenp; long *blocksizep; { static char header[20]; long n, max, mul, blocksize; - char *ep, *p, *form; + char *ep, *p; + const char *form; #define KB (1024L) #define MB (1024L * 1024L)