From 4e7b1578384250a0ab7b054af0fabe157a5dba45 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 10 Jul 2009 23:46:36 +0100 Subject: [PATCH] Prototypes for rxdebug Trivial prototyping and warning cleanup for the rxdebug directory Reviewed-on: http://gerrit.openafs.org/47 Verified-by: Russ Allbery Reviewed-by: Russ Allbery --- src/rxdebug/rxdebug.c | 15 +++++---------- src/rxdebug/rxdumptrace.c | 3 +-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/rxdebug/rxdebug.c b/src/rxdebug/rxdebug.c index 8ebd6c2..a231cf1 100644 --- a/src/rxdebug/rxdebug.c +++ b/src/rxdebug/rxdebug.c @@ -32,6 +32,7 @@ #endif #include #include +#include #include #include @@ -46,17 +47,14 @@ #define TIMEOUT 20 -extern struct hostent *hostutil_GetHostByName(); - static short -PortNumber(aport) - register char *aport; +PortNumber(char *aport) { register int tc; register short total; total = 0; - while (tc = *aport++) { + while ((tc = *aport++)) { if (tc < '0' || tc > '9') return -1; /* bad port number */ total *= 10; @@ -66,8 +64,7 @@ PortNumber(aport) } static short -PortName(aname) - register char *aname; +PortName(char *aname) { register struct servent *ts; ts = getservbyname(aname, NULL); @@ -593,9 +590,7 @@ MainCommand(struct cmd_syndesc *as, void *arock) #include "AFS_component_version_number.c" #endif int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct cmd_syndesc *ts; diff --git a/src/rxdebug/rxdumptrace.c b/src/rxdebug/rxdumptrace.c index c7af576..f1895ef 100644 --- a/src/rxdebug/rxdumptrace.c +++ b/src/rxdebug/rxdumptrace.c @@ -43,8 +43,7 @@ struct rx_trace { #endif int -main(argc, argv) - char **argv; +main(int argc, char **argv) { struct rx_trace ip; int err = 0; -- 1.9.4