Use bool.

This commit is contained in:
dyoung 2008-09-09 16:18:17 +00:00
parent 3c17f72932
commit a26d1ce8fc
3 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.9 2006/09/23 22:41:25 dyoung Exp $ */
/* $NetBSD: extern.h,v 1.10 2008/09/09 16:18:17 dyoung Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@ -33,7 +33,7 @@ struct sockaddr;
struct sockaddr_x25;
struct sockaddr_ns;
void parse_show_opts(int, char **, int *, int *, const char **, int);
void parse_show_opts(int, char **, int *, int *, const char **, bool);
/* show.c */
void show(int, char **);

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.c,v 1.107 2008/07/20 01:20:23 lukem Exp $ */
/* $NetBSD: route.c,v 1.108 2008/09/09 16:18:17 dyoung Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1991, 1993\
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: route.c,v 1.107 2008/07/20 01:20:23 lukem Exp $");
__RCSID("$NetBSD: route.c,v 1.108 2008/09/09 16:18:17 dyoung Exp $");
#endif
#endif /* not lint */
@ -253,7 +253,7 @@ flushroutes(int argc, char *argv[], int doall)
flags = 0;
af = AF_UNSPEC;
shutdown(sock, SHUT_RD); /* Don't want to read back our messages */
parse_show_opts(argc, argv, &af, &flags, &afname, 0);
parse_show_opts(argc, argv, &af, &flags, &afname, false);
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
mib[2] = 0; /* protocol */

View File

@ -1,4 +1,4 @@
/* $NetBSD: show.c,v 1.35 2006/10/16 02:55:10 christos Exp $ */
/* $NetBSD: show.c,v 1.36 2008/09/09 16:18:17 dyoung Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94";
#else
__RCSID("$NetBSD: show.c,v 1.35 2006/10/16 02:55:10 christos Exp $");
__RCSID("$NetBSD: show.c,v 1.36 2008/09/09 16:18:17 dyoung Exp $");
#endif
#endif /* not lint */
@ -52,6 +52,7 @@ __RCSID("$NetBSD: show.c,v 1.35 2006/10/16 02:55:10 christos Exp $");
#include <sys/sysctl.h>
#include <netdb.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -100,7 +101,7 @@ static void p_flags(int);
void
parse_show_opts(int argc, char **argv, int *afp, int *flagsp,
const char **afnamep, int nolink)
const char **afnamep, bool nolink)
{
const char *afname = "unspec";
int af, flags;
@ -174,7 +175,7 @@ show(int argc, char **argv)
struct rt_msghdr *rtm;
struct sockaddr *sa;
parse_show_opts(argc, argv, &af, &flags, NULL, 1);
parse_show_opts(argc, argv, &af, &flags, NULL, true);
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
mib[2] = 0;