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_dump/pmap_dump.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_dump/pmap_dump.c')
-rw-r--r-- | usr.sbin/portmap/pmap_dump/pmap_dump.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/portmap/pmap_dump/pmap_dump.c b/usr.sbin/portmap/pmap_dump/pmap_dump.c index 944081f..a23896e 100644 --- a/usr.sbin/portmap/pmap_dump/pmap_dump.c +++ b/usr.sbin/portmap/pmap_dump/pmap_dump.c @@ -25,12 +25,10 @@ static const char rcsid[] = #include <rpc/pmap_clnt.h> #include <rpc/pmap_prot.h> -static char *protoname(); +static const char *protoname(u_long); int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { struct sockaddr_in addr; register struct pmaplist *list; @@ -51,8 +49,8 @@ char **argv; return (fclose(stdout) ? (perror(argv[0]), 1) : 0); } -static char *protoname(proto) -u_long proto; +static const char * +protoname(u_long proto) { static char buf[BUFSIZ]; |