1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00

Change two variables to size_t to improve portability.

Submitted by:	Xin Li
This commit is contained in:
Julian Elischer 2008-05-10 15:02:56 +00:00
parent d219022c4c
commit 05b0fdac8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178916
2 changed files with 3 additions and 2 deletions

View File

@ -4964,11 +4964,12 @@ add(int ac, char *av[])
case TOK_SETFIB:
{
int numfibs;
size_t intsize = sizeof(int);
action->opcode = O_SETFIB;
NEED1("missing fib number");
action->arg1 = strtoul(*av, NULL, 10);
if (sysctlbyname("net.fibs", &numfibs, &i, NULL, 0) == -1)
if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1)
errx(EX_DATAERR, "fibs not suported.\n");
if (action->arg1 >= numfibs) /* Temporary */
errx(EX_DATAERR, "fib too large.\n");

View File

@ -50,7 +50,7 @@ main(int argc, char *argv[])
int ch;
char *ep;
int numfibs;
int intsize = sizeof(int);
size_t intsize = sizeof(int);
if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1)
errx(1, "Multiple FIBS not supported");