diff options
author | brian <brian@FreeBSD.org> | 2000-01-12 21:53:46 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-01-12 21:53:46 +0000 |
commit | 1e3f91cfff7a8c5321271c132f7e4f705cb23bf3 (patch) | |
tree | 4a6dbf6b996e83674e46947ebcaa858b49a7437e /usr.sbin/portmap/pmap_set/pmap_set.c | |
parent | dd5364f05aa0be5c6fb5456f094a5cb14b4fd510 (diff) | |
download | FreeBSD-src-1e3f91cfff7a8c5321271c132f7e4f705cb23bf3.zip FreeBSD-src-1e3f91cfff7a8c5321271c132f7e4f705cb23bf3.tar.gz |
As we parse the interface list, ignore sockaddr_dl's that
don't have an interface index that's the same as the if_msghdr
interface index.
This prevents the occasional perror("SIOCGIFFLAGS") from appearing
at boot time.
While I'm there:
Make a couple of error messages more useful.
Add a missing include.
Add some braces to silence gccs dumb complaints.
Add some consts
Ansify decls
Add copyright to pmap_check.h (well, you could say it's been rewritten)
Diffstat (limited to 'usr.sbin/portmap/pmap_set/pmap_set.c')
-rw-r--r-- | usr.sbin/portmap/pmap_set/pmap_set.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.sbin/portmap/pmap_set/pmap_set.c b/usr.sbin/portmap/pmap_set/pmap_set.c index 34b4bc1..deeb686 100644 --- a/usr.sbin/portmap/pmap_set/pmap_set.c +++ b/usr.sbin/portmap/pmap_set/pmap_set.c @@ -22,12 +22,10 @@ static const char rcsid[] = #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> -int parse_line __P((char *, u_long *, u_long *, int *, unsigned *)); +static int parse_line (char *, u_long *, u_long *, int *, unsigned *); int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { struct sockaddr_in addr; char buf[BUFSIZ]; @@ -51,13 +49,8 @@ char **argv; /* parse_line - convert line to numbers */ -int -parse_line(buf, prog, vers, prot, port) -char *buf; -u_long *prog; -u_long *vers; -int *prot; -unsigned *port; +static int +parse_line(char *buf, u_long *prog, u_long *vers, int *prot, unsigned *port) { char proto_name[BUFSIZ]; |