1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

ANSIfy some more tools in usr.sbin/.

Most of these tools build with WARNS=6, except for their use of K&R
function declarations.
This commit is contained in:
Ed Schouten 2010-01-02 11:05:34 +00:00
parent b7946da96b
commit 9a958de54c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201387
13 changed files with 24 additions and 40 deletions

View File

@ -80,7 +80,7 @@ main(int argc, char *argv[])
}
static void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: accton [file]\n");
exit(1);

View File

@ -1327,8 +1327,8 @@ an_setkeys(const char *iface, const char *key, int keytype)
}
}
static void an_readkeyinfo(iface)
const char *iface;
static void
an_readkeyinfo(const char *iface)
{
struct an_req areq;
struct an_ltv_genconfig *cfg;

View File

@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
* Works with a live kernel only.
*/
void
asf_kld()
asf_kld(void)
{
struct kld_file_stat kfs;
int fid = 0; /* indicates the beginning of the linker file list */

View File

@ -61,9 +61,7 @@ char *group; /* group to switch to ... */
char *grouplist; /* group list to switch to ... */
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
struct group *gp;
struct passwd *pw;
@ -179,7 +177,7 @@ main(argc, argv)
}
static void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: chroot [-g group] [-G group,group,...] "
"[-u user] newroot [command]\n");

View File

@ -54,7 +54,7 @@ long num_inodes_by_path(char *path);
void usage(void);
void
usage()
usage(void)
{
fprintf(stderr,

View File

@ -791,7 +791,7 @@ exit_success(const char *fmt, ...)
#ifdef USE_ROUTE
static void
grab_myaddrs()
grab_myaddrs(void)
{
struct ifaddrs *ifap, *ifa;
struct myaddrs *p;
@ -847,7 +847,7 @@ grab_myaddrs()
}
static void
free_myaddrs()
free_myaddrs(void)
{
struct myaddrs *p, *q;
@ -861,7 +861,7 @@ free_myaddrs()
}
static void
update_myaddrs()
update_myaddrs(void)
{
char msg[BUFSIZ];
int len;
@ -900,7 +900,7 @@ update_myaddrs()
#endif /*USE_ROUTE*/
static void
usage()
usage(void)
{
fprintf(stderr, "usage: %s [-dp] [-f conf] service [serverpath [serverargs]]\n",
faithdname);

View File

@ -1397,8 +1397,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof (on))
#ifdef IPSEC
void
ipsecsetup(sep)
struct servtab *sep;
ipsecsetup(struct servtab *sep)
{
char *buf;
char *policy_in = NULL;

View File

@ -1148,7 +1148,7 @@ mux_keyboard(u_int op, char *kbd)
}
void
usage()
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n",
"usage: kbdcontrol [-dFKix] [-A name] [-a name] [-b duration.pitch | [quiet.]belltype]",

View File

@ -272,7 +272,7 @@ main(int argc, char *argv[])
}
static void
usage()
usage(void)
{
(void)fprintf(stderr,
"usage: mount_portalfs [-o options] config mount-point\n");

View File

@ -91,10 +91,8 @@ extern const char *__progname;
nt_hdr = (image_nt_header *)(x + dos_hdr->idh_lfanew); \
sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
static
int insert_padding(imgbase, imglen)
void **imgbase;
int *imglen;
static int
insert_padding(void **imgbase, int *imglen)
{
image_section_header *sect_hdr;
image_dos_header *dos_hdr;

View File

@ -154,10 +154,7 @@ usage(void)
}
int
quotaonoff(fs, offmode, type, qfpathname)
register struct fstab *fs;
int offmode, type;
char *qfpathname;
quotaonoff(struct fstab *fs, int offmode, int type, char *qfpathname)
{
if (strcmp(fs->fs_file, "/") && readonly(fs))

View File

@ -68,9 +68,7 @@ static const char *sa_n2a(struct sockaddr *);
static const char *inet6_n2a(struct in6_addr *);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
struct netinfo6 *np;
struct sockaddr_in6 fsock;
@ -175,15 +173,14 @@ main(argc, argv)
}
static void
usage()
usage(void)
{
fprintf(stderr, "usage: rip6query [-I iface] address\n");
}
/* getnameinfo() is preferred as we may be able to show ifindex as ifname */
static const char *
sa_n2a(sa)
struct sockaddr *sa;
sa_n2a(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
@ -195,8 +192,7 @@ sa_n2a(sa)
}
static const char *
inet6_n2a(addr)
struct in6_addr *addr;
inet6_n2a(struct in6_addr *addr)
{
static char buf[NI_MAXHOST];

View File

@ -206,8 +206,7 @@ main(int argc, char **argv)
}
void
getstring(bp)
char *bp;
getstring(char *bp)
{
int i;
char *cp = bp;
@ -222,9 +221,7 @@ getstring(bp)
}
char *
checkbuf(rec, size)
char *rec;
int size;
checkbuf(char *rec, int size)
{
if (size <= maxrecsize)
@ -244,8 +241,7 @@ checkbuf(rec, size)
}
void
error(num)
int num;
error(int num)
{
DEBUG2("rmtd: E %d (%s)\n", num, strerror(num));